diff --git a/MOLPayXDKExample/platforms/android/android.json b/MOLPayXDKExample/platforms/android/android.json index 9ab5b67..5bf736f 100644 --- a/MOLPayXDKExample/platforms/android/android.json +++ b/MOLPayXDKExample/platforms/android/android.json @@ -66,6 +66,6 @@ "cordova-plugin-whitelist": "1.2.1", "cordova-plugin-inappbrowser": "1.4.0", "cordova-plugin-privacyscreen": "0.3.1", - "molpay-mobile-xdk-cordova": "2.0.0" + "molpay-mobile-xdk-cordova": "2.2.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 0ff4a52..07abdd3 100644 --- a/MOLPayXDKExample/platforms/android/assets/www/cordova_plugins.js +++ b/MOLPayXDKExample/platforms/android/assets/www/cordova_plugins.js @@ -27,7 +27,7 @@ module.exports.metadata = "cordova-plugin-whitelist": "1.2.1", "cordova-plugin-inappbrowser": "1.4.0", "cordova-plugin-privacyscreen": "0.3.1", - "molpay-mobile-xdk-cordova": "2.0.0" + "molpay-mobile-xdk-cordova": "2.2.0" }; // BOTTOM OF METADATA }); \ No newline at end of file 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 c013960..e2abc45 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 @@ -

Loading.

Please wait.

Loading...
\ No newline at end of file +

Loading.

Please wait.

Loading...
\ No newline at end of file diff --git a/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/scripts.f29f8607.js b/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/scripts.f29f8607.js new file mode 100644 index 0000000..d29f2bb --- /dev/null +++ b/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/scripts.f29f8607.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}('"9p 9Y";1w.29("2a",["9L","9N","a7","ab-4t","F.5T","at.aB","9D","9f.9H","4k-31","3o","5S","1w.6l.9U","9M.7E"]).9R("4L",["$25",B(a){T{aj:"A",98:B(b,c,d){c.4J("91",B(){a.75()})}}}]).5D("7Q",B(){T{6a:B(a){T a.7t=9u,a}}}).9m(["$9k","$9w",B(a,b){a.51("/",{2x:"1B/3d.1C",1y:"63",4E:"3d"}).51("/3d",{2x:"1B/3d.1C",1y:"63",4E:"3d"}).51("/3q",{2x:"1B/3q.1C",1y:"7n",4E:"3q"}).51("/2R",{2x:"1B/2R.1C",1y:"8n",4E:"2R"}).9n({9l:"/"}),b.9h.ak("7Q")}]).8L(["$25","$3M","$7u","4t","5Y","5T","88","$1V","5E","ax","5S",B(a,b,c,d,e,f,g,h,i,j,k){az.aA(3R.2l),1t.au.5P=B(a,b,c){T aq.1R(3r 87(a.1R(/([\\/\\,\\!\\\\\\^\\$\\{\\}\\[\\]\\(\\)\\.\\*\\+\\?\\|\\<\\>\\-\\&])/g,"\\\\$&"),c?"9O":"g"),"62"==9K b?b.1R(/\\$/g,"$$$$"):b)},a.55=B(a,b){E c=3r 87(a,"g"),d=c.a4(b);T d},a.4X=!0,a.G=!1,a.6E="2.2.",a.4X||(a.G=!0),a.8I="68://38.ac.6j.9Z/",a.7f="68://a1.4g.6j/",a.1M=a.8I,a.6f=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7R",a.4F=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7S",a.4A=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7T",a.5k=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7U",a.36=a.1M+"1S/1X/7V/2c.26",a.4B=a.1M+"1S/1X/82/2c.26",a.3X="",a.2b="",a.3p="",a.9T="9I://",a.7i="9F://",a.61="ao://",a.9E="af://",a.66="9d://",a.42="9v://",a.5U=a.1M+"1S/1v.26",a.7J="9s.9x",a.7v="90",a.7q="97",a.3e=!1,a.6k=!0,a.3S=!1,a.1h={57:"92 1z, 4u 4T 93 95, 9r, 8z 3w",4Z:"9o 9i, 4u 4T 9q 9t, 6n 2t, 8z 8Y 96",4y:"8i 1D 1U, 4u 4T 7a L",7g:"1N L 2h 1U",7b:"1P L 2h 1U",7c:"W L 2h 1U",7d:"1i L 2h 1U",7e:"20 L 2h 1U",6d:"1s L 2h 1U",7k:"2d L 2h 1U",6S:"2p L 2h 1U",6K:"1I 2p L",6M:"1r L 2h 1U",84:"2j L aC 3q 6a 2h 1U",8A:"ah a8, 4u ae ad",5t:"am ay 4z"},a.9={1N:"",1P:"",W:"",1i:"",20:"",1s:"",2d:"ap",2p:"3n",1r:"",1Z:!0,6U:!1,1j:"",30:!0,1T:"",1F:"",1H:"",1J:"",2i:"",59:"0",4o:!1,ar:"",2j:"",1O:"",4b:"",3D:"2",as:"",3E:"",39:"",56:"",4R:"4g-24-67-38",33:"",21:"",1Q:"",2F:"",3Q:"",3Y:"",2H:"",1e:!0,2k:"3n",4i:"6h",2e:"",2f:"",3L:"",5M:"",58:"1",2w:"",22:"",1p:"",5h:"",2T:"",4O:!1,5X:"",2M:"0",4c:!1,4e:!1,6m:"",4Y:"",6i:"",8E:"",6o:"",32:"",8e:"",52:""},!a.4X,a.$3l("9.2k",B(){E b=g.5B(),c=h("1V")(b,a.9.2k,!0);c.P?a.9.4i=c[0][1]:a.9.2k=""}),a.$3l("9.1Q",B(){K(a.9.1Q){E b=1t(a.9.1Q);b=b.1R(/\\//g,"");E c="";b.P>4&&(b=b.1b(0,4)),1===b.P&&(c=8l(b.1b(0,1)),c>1&&(b="")),2===b.P&&(c=8l(b.1b(0,2)),c>12&&(b=b.1b(0,1))),b.P>2&&(b=b.1b(0,2)+"/"+b.1b(2,b.P)),a.9.1Q=b,5===a.9.1Q.P&&(a.9.3Q=a.9.1Q.1b(0,2),a.9.3Y=a.9.1Q.1b(3,5))}}),a.$3l("9.2f",B(){K(a.9.2f){E b=1t(a.9.2f);b.P>10&&(b=b.1b(0,10)),a.9.2f=b}}),a.$3l("9.1e",B(){K(a.9.1e)a.9.33="",a.9.2e="",a.9.21="",a.9.1Q="",a.9.2F="",a.9.2k="3n",a.9.4i="6h",a.9.3Q="",a.9.3Y="",a.9.2H="";1l K(a.9.22){K(a.9.22.P>0&&!a.9.1p)K(a.9.52){E b=h("1V")(a.9.22,a.9.52,!0);K(b.P){a.G&&H.I("52 1U : ",b[0]);E c=a.9.22.45(b[0]);a.9.1p=a.9.22[c]}1l a.9.1p=a.9.22[0]}1l a.9.1p=a.9.22[0];a.9.2e=a.9.1p.65+"******"+a.9.1p.64,a.9.21="",a.9.1Q=a.9.1p.50.1b(2,4)+"/"+a.9.1p.50.1b(0,2),a.9.2F=a.9.1p.8h,a.9.2k=a.9.1p.8D,a.9.2H=a.9.1p.2H}}),a.$3l("9.1p",B(){!a.9.1e&&a.9.1p&&(a.9.2e=a.9.1p.65+"******"+a.9.1p.64,a.9.21="",a.9.1Q=a.9.1p.50.1b(2,4)+"/"+a.9.1p.50.1b(0,2),a.9.2F=a.9.1p.8h,a.9.2k=a.9.1p.8D,a.9.2H=a.9.1p.2H)}),a.9G=B(a,b){K(1m!==a)K(a.8T){E c=a.8T();c.9J("a5",b),c.3I()}1l a.a0?(a.8H(),a.9V(b,b)):a.8H()},a.5G=B(){T a.55("5v 4.1",a.9.39)||a.55("5v 4.2",a.9.39)||a.55("5v 4.3",a.9.39)?!0:!1},a.$3l("9.2e",B(){K(a.9.2e){E b=1t(a.9.2e);K(b=b.1R(/ /g,""),6===b.P&&a.9.2M&&"1"===a.9.2M&&e.8X(b),6===b.P&&a.9.32&&a.9.32.P>0){E c=e.5N(b);c&&(a.9.2e="")}b.P>16&&(b=b.1b(0,16)),a.5G()||(b.P>4&&b.P<=8?b=b.1b(0,4)+" "+b.1b(4,b.P):b.P>8&&b.P<=12?b=b.1b(0,4)+" "+b.1b(4,8)+" "+b.1b(8,b.P):b.P>12&&b.P<16&&(b=b.1b(0,4)+" "+b.1b(4,8)+" "+b.1b(8,12)+" "+b.1b(12,b.P))),16===b.P&&(a.9.33=b,b=b.1b(0,4)+" "+b.1b(4,8)+" "+b.1b(8,12)+" "+b.1b(12,16)),b&&(a.9.2e=b)}}),a.$3l("9.21",B(){K(a.9.21){E b=1t(a.9.21);b.P>4&&(b=b.1b(0,4)),a.9.21=b}}),a.75=B(){!a.9.22&&a.9.1F&&a.9.1H&&a.9.1J&&e.5Q()},a.4U=B(b){a.G&&H.I("9X: "+b),j.9W(b)},a.6J=B(a){E b=!1,c=g.5B(),d=h("1V")(c,a,!0);T d.P&&(b=!0),b},a.78=B(b){a.G&&H.I("78: "+b);E c="",d=h("1V")(a.9.2w,{2t:b},!0);T d.P&&(c=d[0].5g),c},a.8J=B(){E b=a.9.1s,c=a3(b);c=4l*c,a.9.5M=c.7h(0)},a.3k=B(){K(!a.9.1s)T 1K i.1q({1z:a.1h.6d});K(1w.a2(a.9.1s))a.9.1s=a.9.1s.7h(2);1l K(1w.9S(a.9.1s)){E b=h("2S")(a.9.1s,2);K(a.9.1s=b,!a.9.1s)T 1K i.1q({1z:a.1h.6d})}K(!a.9.1N)T 1K i.1q({1z:a.1h.7g});1A{a.9.1N=1t(a.9.1N.2o())}1u(c){a.G&&H.I(c)}K(!a.9.1P)T 1K i.1q({1z:a.1h.7b});1A{a.9.1P=1t(a.9.1P.2o())}1u(c){a.G&&H.I(c)}K(!a.9.W)T 1K i.1q({1z:a.1h.7c});1A{a.9.W=1t(a.9.W.2o())}1u(c){a.G&&H.I(c)}K(!a.9.1i)T 1K i.1q({1z:a.1h.7d});1A{a.9.1i=1t(a.9.1i.2o())}1u(c){a.G&&H.I(c)}K(!a.9.20)T 1K i.1q({1z:a.1h.7e});1A{a.9.20=1t(a.9.20.2o())}1u(c){a.G&&H.I(c)}K(!a.9.2d)T 1K i.1q({1z:a.1h.7k});1A{a.9.2d=1t(a.9.2d.2o())}1u(c){a.G&&H.I(c)}K(!a.9.2p)T 1K i.1q({1z:a.1h.6S});1A{a.9.2p=1t(a.9.2p.2o())}1u(c){a.G&&H.I(c)}K(!a.6J(a.9.2p))T 1K i.1q({1z:a.1h.6K});K(!a.9.1r)T 1K i.1q({1z:a.1h.6M});1A{a.9.1r=1t(a.9.1r.2o())}1u(c){a.G&&H.I(c)}K((1K 0===a.9.1Z||1m===a.9.1Z)&&(a.9.1Z=!0),a.9.1N&&a.9.1P&&a.9.1r&&a.9.W&&a.9.1i&&a.9.1Z)1A{K(!a.2u){a.2u=k.4P().N();E g=18.3f(a.9.W+a.9.1i+a.2u).N();a.9.1N=18.28.3J(a.9.1N,g).N(),a.9.1P=18.28.3J(a.9.1P,g).N(),a.9.1r=18.28.3J(a.9.1r,g).N()}}1u(c){i.1q({1z:a.1h.5t})}1l a.9.53="5a "+d.2v(a.9.1N+":"+a.9.1P);K(1K 0===a.9.56&&(a.9.56="x"),a.9.3E=a.6E+a.9.56,a.9.39=f.9Q.9P,a.9.3D="2",a.9.58="1",1K 0===a.9.59&&(a.9.59="0"),a.9.6U=!1,a.9.2M||(a.9.2M="0"),1K 0===a.9.4O&&(a.9.4O=!0),a.9.4R||(a.9.4R="4g-24-67-38"),a.9.30||(a.9.30=!1),a.9.1j?"3O"===a.9.1j&&(a.9.30=!0,a.9.2T="(3u 3I a 1D)"):(a.9.1j="3O",a.9.30=!0,a.9.2T="(3u 3I a 1D)"),a.9.1T||(a.9.1T=!1),a.9.1F&&a.9.1H&&a.9.1J&&a.9.2i&&a.9.1F||(a.9.1T=!0),a.9.1H)1A{a.9.1H=1t(a.9.1H.2o())}1u(c){a.G&&H.I(c)}K(a.9.1J)1A{a.9.1J=1t(a.9.1J.2o())}1u(c){a.G&&H.I(c)}K(a.9.2i)1A{a.9.2i=1t(a.9.2i.2o())}1u(c){a.G&&H.I(c)}K(a.9.1F)1A{a.9.1F=1t(a.9.1F.2o())}1u(c){a.G&&H.I(c)}T a.9.4o||(a.9.4o=!1),a.9.2k="3n",a.9.4i="6h",a.9.1e=!0,"3t"!==a.9.1O||a.9.2j?(a.9.6m?(4S(B(){a.$a6(a.4U(a.9.6m))},0),4S(B(){1w.6W(3R.6V("6n-2l")).6l({6X:"6G"}),a.6k=!1},4l)):(1w.6W(3R.6V("6n-2l")).6l({6X:"6G"}),a.6k=!1),(a.9.6i||a.9.4Y)&&("1"===a.9.6i?a.1M=a.7f:a.9.4Y&&(a.1M=a.9.4Y),a.6f=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7R",a.4F=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7S",a.4A=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7T",a.5k=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7U",a.36=a.1M+"1S/1X/7V/2c.26",a.4B=a.1M+"1S/1X/82/2c.26",a.5U=a.1M+"1S/1v.26"),1K(a.9.1O&&"ag"===a.9.1O?a.3N():e.79())):1K i.1q({1z:a.1h.84})},a.al=B(){T a.9.39},a.5Z=B(b){a.G&&H.I("5Z: "+b);E c="",d=h("1V")(a.9.2w,{2t:b},!0);T d.P&&(c=d[0].6L),c},1x.ai=B(){a.3S=!0},1x.3k=B(b,c){a.9={},c&&(a.4W=c),a.G&&H.I("1x.3k, 7A = "+c);1A{a.9=1a.3V(b)}1u(d){a.9=1w.7z(a.9,b)}a.G&&H.I("1x.3k: $25.9 = "+1a.1k(a.9)),a.3k()},1x.9g=B(b){E c=b.2Y;1A{c=1a.3V(b).2Y}1u(d){c=b.2Y}a.G&&H.I("1L.2Y: "+c);E f="";c.45(a.5U)>-1&&(a.G&&H.I("8Q 1v 8Z"),a.3X=c,e.8V(),f=a.61,a.27(f))},1x.94=B(b){E c=b.2Y;1A{c=1a.3V(b).2Y}1u(e){c=b.2Y}a.G&&H.I("1L.2Y: "+c);E f="",g="",h="",i="";c.45(a.7J)>-1?(a.G&&H.I("99 3j 9c 2L: "+c),g="1x.3M.9b(9a(9e))",h="4S(B(){"+g+"; }, 4l);",i=d.2v(h),f=a.66+i,a.G&&H.I("7o 7w 4J 7x, 35 = "+f),a.27(f)):(c.45(a.7v)>-1||c.45(a.7q)>-1)&&(a.G&&H.I("9y 9C 3j 1v 2L: "+c),g=\'3R.7m.9B="9A"; 3R.7m.9j();\',h="4S(B(){"+g+"; }, 4l);",i=d.2v(h),f=a.66+i,a.G&&H.I("7o 7w 4J 7x, 35 = "+f),a.27(f))},a.7F=B(){E b=a.61;a.27(b)},a.5L=B(){e.5x(),a.7F()},1x.5L=B(){a.5L()},a.3N=B(){"3t"===a.9.1O&&a.9.2j&&""!==a.9.2j?a.3W():a.9.2j&&""!==a.9.2j?a.3W():e.5x()},1x.3N=B(){a.3N()},1x.aw=B(b){b&&(a.9.20=b),a.3N()},1x.b9=B(b){b&&(a.9.2j=b),a.3N()},1x.cu=B(a){E b=1t(a),c=f.5V;T a&&"7H"===c&&(b=b.1R(/\\-/g,"+"),b=b.1R(/\\7G/g,"=")),b},1x.4U=B(b){a.4U(b)},1x.5p=B(b,c){a.9={},a.G&&H.I("1x.5p, 7A = "+c),c&&(a.2O=c);1A{a.9=1a.3V(b)}1u(f){a.9=1w.7z(a.9,b)}K(a.G&&H.I("1x.5p: $25.9 = "+1a.1k(a.9)),(1K 0===a.9.1Z||1m===a.9.1Z)&&(a.9.1Z=!0),a.9.1N&&a.9.1P&&a.9.1r&&a.9.W&&a.9.1i&&a.9.1Z)1A{K(!a.2u){a.2u=k.4P().N();E g=18.3f(a.9.W+a.9.1i+a.2u).N();a.9.1N=18.28.3J(a.9.1N,g).N(),a.9.1P=18.28.3J(a.9.1P,g).N(),a.9.1r=18.28.3J(a.9.1r,g).N()}}1u(f){i.1q({1z:a.1h.5t})}1l a.9.53="5a "+d.2v(a.9.1N+":"+a.9.1P);e.6e()},a.27=B(b){E c=b,d=f.5V;a.G&&H.I("27 5V Z:"+1a.1k(d,1m,"")),a.G&&H.I("27: \\7Z: "+c),a.4W?(a.4W(b),a.G&&H.I("$25.27, $25.4W 35 = "+b)):("7H"===d&&(c=b.1R(/\\+/g,"-"),c=c.1R(/\\=/g,"7G")),a.9.6o&&(c=a.9.6o+c,a.G&&H.I("27: \\cn: "+c)),1x.3M=c)},a.6T=B(){a.3k(),b.2L("/3d").1R()},a.4X||a.3k()}]),1w.29("2a").1y("cF",B(){}),1w.29("2a").1y("63",["$2r","$25","$3M","$7s","5Y","7E",B(a,b,c,d,e,f){a.8k=B(){E a=!1;T b.9.2M&&b.9.1e&&"1"===1t(b.9.2M)&&(b.9.4c||(a=!0)),a},a.8y=B(){K(!b.9.1e){E c=d.3c({3b:!0,2x:"1B/7I.1C",1y:"8c",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.6Y=B(){K(b.9.30){E c=d.3c({3b:!0,2x:"1B/7D.1C",1y:"8C",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.8O=B(){K(b.9.1e){E c=d.3c({3b:!0,2x:"1B/80.1C",1y:"8a",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.8U=B(){K(b.9.1e){E c=d.3c({3b:!0,2x:"1B/7l.1C",1y:"8W",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.89=B(){E a=!1,c={};K(c.5i="1I 3j 5A",c.1G="",b.9.1F)K(0===b.9.1F.P)a=!0,c.1G="1I 2D 2t";1l K(b.9.1H)K(0===b.9.1H.P)a=!0,c.1G="1I 2D 6t";1l K(b.9.1J)K(0===b.9.1J.P)a=!0,c.1G="1I 2D 24";1l K("3O"===b.9.1j)a=!0,c.1G="3u 3I a 3j 1D";1l K("2B"===b.9.1j||"6y"===b.9.1j)K(!b.9.33||b.9.33.P<16)a=!0,c.1G="1I 2B 2N 2S";1l K(!f.4T(b.9.33)&&b.9.1e)a=!0,c.1G="1I 2B 2N 2S (cG)";1l K(!b.9.21||b.9.21.P<3)a=!0,c.1G="1I 4M 2S";1l K(!b.9.1Q||b.9.1Q.P<5)a=!0,c.1G="1I 4s 6c";1l K(b.9.2F){K(b.9.32&&b.9.32.P>0&&(a=e.5N(b.9.33)))T}1l a=!0,c.1G="1I 7L 2t";1l"4v"===b.9.1j&&(!b.9.2f||b.9.2f.P<10?(a=!0,c.1G="1I 7p 2S"):b.9.3L||(a=!0,c.1G="1I 7p 8b"));1l a=!0,c.1G="1I 2D 24";1l a=!0,c.1G="1I 2D 6t";1l a=!0,c.1G="1I 2D 2t";K(a){E g=d.3c({3b:!0,2x:"1B/5d.1C",1y:"5f",3s:"14",3i:{3m:B(){T c}}});g.1v.2q(B(){},B(){})}1l e.70(),b.3a("2z","cE",b.9.1j.N())}}]),1w.29("2a").1y("7n",["$2r","$25",B(a,b){a.4V={},a.4V.4r={cI:2,bX:60,bW:10,c0:!1,bV:"bU",bR:"2m",c3:12,cb:"",c9:"#c8"},a.73=b.5Z(b.1c.1D)}]),1w.29("2a").5D("5Y",["4t","$7u","$25","$7t","5T","5E","$3M","5S","$7s","$1V",B(a,b,c,d,e,f,g,h,i,j){E k={};T c.3a=B(a,d,e){K(c.9.4O){c.G&&H.I("3B, c7 = "+a+", c6 = "+d+", c4 = "+e);E f="v=1",g="&c5=ca-ch-7",i=c.9.5X;1x.4Q&&!i?(i=1x.4Q.ci("7X"),i?c.G&&H.I("3B, cg 7W 1U, cf 4j = "+i):(i=h.4P().N(),1x.4Q.cc("7X",i),c.G&&H.I("3B, 7W 2h 1U, 3r 4j 85 = "+i))):i||(i=h.4P().N(),c.9.5X=i,c.G&&H.I("3B, 4Q 2h ce, 3r 4j 85 = "+i));E j="&c2="+i,k="&83=bS";c.9.W&&(k="&83="+c.9.W.N());E l="&t=bT",m="&bQ=%bO",n="&bP=7N",o="&cd=7N",p="&an="+c.9.4R.N(),q="&7O=4g-24-67-38";c.9.1i&&(q="&7O="+c.9.1i.N());E r="&av="+c.9.3E.N(),s="&c1="+a.N(),t="&bZ="+d.N(),u="&bY="+e.N(),v="68://38.ck-cj.6j/cH?"+f+g+j+k+l+m+n+o+p+q+r+s+t+u,w={5b:"4H",35:v};b(w).2q(B(a){c.G&&H.I("3B, 6Q 6P cC, 6O = "+1a.1k(a))},B(a){c.G&&H.I("3B, 6Q 6P 4z, 6O = "+1a.1k(a))})}},k.3x=B(a){T 18.3x(a).N()},k.2J=B(a){T 18.2J(a).N()},k.1Y=B(a,b){T"cD="+a+"&cq="+1a.1k(b,1m,"")},k.2C=B(d,e){c.3e=!0;E g=c.9.53;K(c.9.1Z){E h=18.3f(c.9.W+c.9.1i+c.2u).N();g="5a "+a.2v(18.28.2V(c.9.1N.N(),h).N(18.2Z.34)+":"+18.28.2V(c.9.1P.N(),h).N(18.2Z.34))}E i={5b:"4H",35:d,5o:{5y:"3F/3C",8o:g,"5z-3y":"3F/x-38-S-5K","5J-3y":"3C","8w-8v":c.9.3E},1L:e};b(i).2q(B(a){K(c.3e=!1,a.1L.2s)c.G&&H.I("1X 8q 5O 1L 5F 2s:"+a.1L.2s),f.4G(d,a.1L.1v);1l K("cr"===a.6H){K(c.G&&H.I("1X cs: \\n"+1a.1k(a.1L,1m,"")),a.1L.2s===!1)31(a.1L.1v.cp){2Q co:2Q cl:c.G&&H.I(c.1h.4Z),f.1q({1z:c.1h.4Z}),c.2O&&c.2O(!1,c.1h.4Z);3g;2Q cm:c.9.1e=!0}(d===c.36||d===c.3X)&&f.4G(d,a.1L)}1l c.G&&H.I("aD 4H 6a 4z: "+a.6H)},B(){c.3e=!1,c.G&&H.I(c.1h.57),f.1q({1z:c.1h.57}),c.2O&&c.2O(!1,c.1h.57)})},k.ct=B(a){c.3e=!0;E d={5b:"cA",35:a,5o:{5y:"3F/3C","5z-3y":"3F/x-38-S-5K","5J-3y":"3C"}};b(d).2q(B(){c.3e=!1},B(){c.3e=!1,c.G&&H.I("cB cz cy")})},k.3v=B(){E a=c.9.1r;K(c.9.1Z){E b=18.3f(c.9.W+c.9.1i+c.2u).N();a=18.28.2V(c.9.1r.N(),b).N(18.2Z.34)}c.G&&H.I("(1d 1) 54:"+a);E d=k.3x(a).N(),e=c.9.W+c.9.1i+d;c.G&&H.I("(1d 2) cv + cw + cx(54):"+e);E f=k.2J(e).N();T c.G&&H.I("(1d 3) 2J(bM 3K 1d 2):"+f),f},k.5r=B(a){E b=c.9.1r;K(c.9.1Z){E d=18.3f(c.9.W+c.9.1i+c.2u).N();b=18.28.2V(c.9.1r.N(),d).N(18.2Z.34)}E e=c.9.1s,f=c.9.W,g=c.9.20,h=b,i=a,j=k.3x(e+f+g+h+i).N();T j},k.8F=B(){E a=c.9.1r;K(c.9.1Z){E b=18.3f(c.9.W+c.9.1i+c.2u).N();a=18.28.2V(c.9.1r.N(),b).N(18.2Z.34)}E d=c.9.1s,e=c.9.W,f=c.9.2j,g=a,h="4C",i=k.3x(e+h+f+d+g).N();T i},k.5w=B(){E a=c.9.1r;K(c.9.1Z){E b=18.3f(c.9.W+c.9.1i+c.2u).N();a=18.28.2V(c.9.1r.N(),b).N(18.2Z.34)}E d=c.9.1s,e=c.9.W,f=c.9.20,g=a,h="4D",i=e+h+f+d+g;c.G&&H.I("5w b1:"+i);E j=k.3x(i).N();T j},c.b0=B(a){E b=c.6f,d=c.9.W+a+c.9.39,e=d+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+e);E f=k.2J(e).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+f);E g={4N:c.9.W,aZ:a+c.9.39},h=k.1Y(f,g);c.G&&H.I("(1d 6) 2P 1Y:"+h),k.2C(b,h)},k.6e=B(){E a=c.4F,b=c.9.W+c.9.2d,d=b+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+d);E e=k.2J(d).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+e);E f={4N:c.9.W,7a:c.9.2d},g=k.1Y(e,f);c.G&&H.I("(1d 6) 2P 1Y:"+g),k.2C(a,g)},k.72=B(){E a=c.4A,b=c.9.W,d=b+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+d);E e=k.2J(d).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+e);E f={4N:c.9.W},g=k.1Y(e,f);c.G&&H.I("(1d 6) 2P 1Y:"+g),k.2C(a,g)},k.5Q=B(){E a="aX",b=c.9.2M,d=c.4B,e=6Z("+"),f=1t(c.9.1J).5P("+",e),g=c.9.W+c.9.1F+c.9.1H+c.9.1J+c.9.1i+a+b,h=g;c.G&&H.I("(1d 4) 3P 46:"+h);E i=k.2J(h).N(),j=i+k.3v();c.G&&H.I("(1d 5) 41(1v 3K 1d 4) + 4a 3w:"+j);E l={3U:c.9.W,6p:c.9.1F,5q:c.9.1H,5l:f,5m:c.9.1i,3T:a,1V:b},m=k.1Y(j,l);c.G&&H.I("(1d 6) 2P 1Y:"+m),k.2C(d,m)},k.79=B(){k.6e(),k.72(),c.9.1F&&c.9.1H&&c.9.1J&&k.5Q()},k.70=B(){c.2b="6r";E a=c.2b,b=c.36,d=6Z("+"),e=1t(c.9.1J).5P("+",d),f={4q:c.9.1s,5m:c.9.1i,8R:c.9.2i,5q:c.9.1H,5l:e,6p:c.9.1F,1D:c.9.1j,5R:c.9.2d,3D:c.9.3D,3U:c.9.W,3T:a,8N:c.9.20,58:c.9.58,4h:c.9.2p,54:k.5r(a),2f:c.9.2f,1V:c.9.2M,aY:c.9.59};"2B"===c.9.1j||"6y"===c.9.1j?(f.4M=c.9.21,f.3Q=c.9.3Q,f.3Y=c.9.3Y,f.b3=c.9.2F,!c.9.1e&&c.9.2H?f.2H=c.9.2H:f.b4=c.9.33):"4v"===c.9.1j&&(f.2f=c.9.2f,f.3L=c.9.3L),c.3S&&(f.3S=c.3S),c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(f,1m,"")),g.2L("/2R").1R(),k.2C(b,f)},k.8V=B(){E a=c.3X,b="";c.G&&H.I("bN 8Q 5O 35:"+a),k.2C(a,b)},c.3W=B(){c.2b="4C";E a=c.2b,b=c.36,d={3U:c.9.W,69:c.9.2j,4q:c.9.1s,4b:k.8F(),3T:a};c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(d,1m,"")),g.2L("/2R").1R(),k.2C(b,d)},k.5x=B(){c.2b="4D";E a=c.2b,b=c.36,d={3U:c.9.W,b8:c.9.20,4q:c.9.1s,4b:k.5w(),3T:a};c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(d,1m,"")),g.2L("/2R").1R(),k.2C(b,d)},k.b5=B(){c.2b="7y";E a=c.2b,b=c.36,d={4q:c.9.1s,8N:c.9.20,4h:c.9.2p,5R:c.9.2d,3U:c.9.W,54:k.5r(a),1D:"b6",6p:c.9.1F,5q:c.9.1H,5l:c.9.1J,5m:c.9.1i,8R:c.9.2i,3D:c.9.3D,3T:a};c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(d,1m,"")),g.2L("/2R").1R(),k.2C(b,d)},k.8X=B(d){E e=d;K(c.G&&H.I("3A 44, 5H ="+e),e){c.9.4c=!1,c.9.4e=!0;E f=c.5k,g=c.9.W+e,h=g+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+h);E j=k.2J(h).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+j);E l={4N:c.9.W,3A:e},m=k.1Y(j,l);c.G&&H.I("(1d 6) 2P 1Y:"+m);E n=c.9.53;c.9.1Z&&(n="5a "+a.2v(18.28.2V(c.9.1N.N(),c.9.W+c.9.1i).N(18.2Z.34)+":"+18.28.2V(c.9.1P.N(),c.9.W+c.9.1i).N(18.2Z.34)));E o={5b:"4H",35:f,5o:{5y:"3F/3C",8o:n,"5z-3y":"3F/x-38-S-5K","5J-3y":"3C","8w-8v":c.9.3E},1L:m};b(o).2q(B(a){K(c.9.4e=!1,a.1L.2s&&(c.G&&H.I("1X 8q 5O 1L 5F 2s:"+a.1L.2s),8r(a.1L.2s)&&(c.9.4c=8r(a.1L.1v.2s),!c.9.4c))){E b={};b.5i="1I 3j 5A",b.1G="1I aL 2N 2S";E d=i.3c({3b:!0,2x:"1B/5d.1C",1y:"5f",3s:"14",3i:{3m:B(){T b}}});d.1v.2q(B(){},B(){c.9.2e=""})}},B(){c.9.4e=!1})}},k.5N=B(a){E b=!1,d=a;K(c.G&&H.I("3A 4x 44, 5H ="+d),d){d.P>5&&(d=a.1b(0,6),c.G&&H.I("3A 4x 44, 5H ="+d)),c.G&&H.I("3A 4x 44, 32 =",c.9.32);E e=j("1V")(c.9.32,d,!0);K(c.G&&H.I("3A 4x 44, 1U =",e),0===e.P){E f={};f.5i="1I 3j 5A",f.1G=c.9.8e;E g=i.3c({3b:!0,2x:"1B/5d.1C",1y:"5f",3s:"14",3i:{3m:B(){T f}}});T g.1v.2q(B(){},B(){c.9.1e&&(c.9.2e="")}),b=!0}}T b},k}]),1w.29("2a").5D("5E",["$25","4t","$3M","$1V",B(a,b,c,d){E e={};T e.6w=B(b){K(b){a.9.2w=b,a.2O&&a.9.2w.P>0&&a.2O(!0);E c="";a.5G()&&(c=d("1V")(a.9.2w,{5g:"2B"},!0),c.P&&(a.G&&H.I("1U 5F aN = "+c),a.9.2w.aO(c.2c,1))),0===a.9.2w.P&&(a.G&&H.I(a.1h.4y),e.1q({1z:a.1h.4y}),a.2O&&a.2O(!1,a.1h.4y)),"3O"!==a.9.1j?(c=d("1V")(a.9.2w,{5g:a.9.1j},!0),c.P?a.9.2T=c[0].5C:(a.9.1j="3O",a.9.2T="(3u 3I a 1D)")):(a.9.1j="3O",a.9.2T="(3u 3I a 1D)"),("3t"===a.9.1O||a.9.2j)&&a.3W()}a.G&&H.I("6w: \\2I: "+1a.1k(a.9.2w,1m,"")),a.3a("7K","7M","bc")},e.6x=B(b){b&&(a.9.22=b,a.9.22.P>0?a.9.1e=!1:a.9.1e=!0),a.G&&H.I("6x: \\2I: "+1a.1k(a.9.22,1m,""))},e.6u=B(b){b&&(a.9.5h=b),a.G&&H.I("6u: \\2I: "+1a.1k(a.9.5h,1m,""))},e.48=B(c){K(a.G&&H.I("48: \\2I: "+c),c&&c.P>0){E d=b.2v(c);a.G&&H.I("3Z: \\40: "+d);E f=a.7i+d;a.27(f),a.3a("2z","6r","bd")}1l{a.G&&H.I("48: \\bB 1v: "+1a.1k(c));1A{E g=1m;1A{g=1a.3V(c)}1u(h){g=c}K(a.G&&H.I("48: \\bA: "+g),g.8t&&g.6v&&g.6v.P>0){E i=g.8t+", "+g.6v;e.1q({1z:i})}}1u(h){e.1q({1z:a.1h.8A})}}},e.6A=B(b){a.3p=b,a.G&&H.I("6A: \\2I: "+1a.1k(a.3p,1m,"")),a.3p&&""!==a.3p&&(a.9.2j=a.3p.bw,a.9.4b=a.3p.4b,a.3W())},e.6C=B(d){a.1c=d,a.1c.6q&&1===a.1c.6q&&(a.1c.1O="3t"),a.9.1O&&(a.1c.1O=a.9.1O,"3t"===a.1c.1O&&a.1c&&a.1c.3H&&"11"===a.1c.3H&&(a.G&&H.I("3t 2s 4z, by bD bE"),a.1c.1O="")),a.G&&H.I("6C: \\2I: "+1a.1k(a.1c,1m,""));E e=b.2v(1a.1k(a.1c,1m,""));a.G&&H.I("3Z: \\40: "+e);E f=a.42+e;a.27(f),("3t"===a.9.1O||1===a.1c.6q)&&a.1c&&a.1c.3H&&"11"!==a.1c.3H&&c.2L("/3q").1R();E g=a.1c.3H;g||(g="77"),a.3a("74","4C",g.N())},e.6B=B(c){a.49=c,a.9.1O&&(a.49.1O=a.9.1O),a.G&&H.I("6B: \\2I: "+1a.1k(a.49,1m,""));E d=b.2v(1a.1k(a.49,1m,""));a.G&&H.I("3Z: \\40: "+d);E e=a.42+d;a.27(e);E f=a.49.3H;f||(f="77"),a.3a("74","4D",f.N())},e.6D=B(c){a.6s=c,a.G&&H.I("6D: \\2I: "+1a.1k(a.6s,1m,""));E d=b.2v(1a.1k(a.6s,1m,""));a.G&&H.I("3Z: \\40: "+d);E e=a.42+d;a.27(e)},e.1q=B(d){E e=d;e.71=a.9.71,c.2L("/2R").1R(),a.G&&H.I("1q: \\2I: "+1a.1k(d,1m,""));E f=b.2v(1a.1k(d,1m,""));a.G&&H.I("3Z: \\40: "+f);E g=a.42+f;a.27(g),a.3a("7K","7M","bv")},e.4G=B(b,c){31(a.G&&H.I("4G: \\7Z: "+b),b){2Q a.4F:e.6w(c);3g;2Q a.4B:e.6x(c);3g;2Q a.4A:e.6u(c);3g;2Q a.bu:e.bj(c);3g;2Q a.36:"6r"===a.2b?e.48(c):"4C"===a.2b?e.6C(c):"4D"===a.2b?e.6B(c):"7y"===a.2b&&e.6D(c);3g;2Q a.3X:e.6A(c);3g;be:a.G&&H.I("bl bm\'t bs a bt")}},e}]),1w.29("2a").1y("8n",B(){}),1w.29("2a").1y("8C",["$2r","$47","$25",B(a,b,c){a.7B=B(a){c.9.1j=a.5g,c.9.2T=a.5C,"4v"===c.9.1j?c.8J():c.9.1O="",b.2G()},a.1W=B(){b.2G()}}]),1w.29("2a").1y("8W",["$25","$2r","$47",B(a,b,c){b.7Y=B(b){a.9.2F=b.2t,c.2G()},b.1W=B(){c.2G()}}]),1w.29("2a").1y("8a",["$2r","88","$25","$47",B(a,b,c,d){a.8j=b.5B(),a.8m=B(a){c.9.2k=a[0],d.2G()},a.1W=B(){d.2G()}}]),1w.29("2a").1y("5f",["$2r","$47","3m",B(a,b,c){a.3m=c,a.1W=B(){b.2G()}}]),1w.29("2a").1y("8c",["$2r","$47","$25",B(a,b,c){a.7r=B(a){c.9.1p=a,b.2G()},a.1W=B(){b.2G()}}]),1w.29("2a").8L(["$bo",B(a){a.2K("1B/5d.1C",\' <6F>{{3m.5i}} <86>{{3m.1G}} <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/7l.1C",\' {{ O.2t }} <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/7I.1C",\' {{ O.65 }} ****** {{ O.64 }} {{ O.bp }} <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/7D.1C",\' {{ O.5C }} <4m y="1D-76" F-5s="{{ O.6L }}"> <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/80.1C",\' {{ O[1] }} <1f y="1W-1f" Z="1f" F-1g="1W()">bn \'),a.2K("1B/2R.1C",\'

br 3j 2s.

3u bg.

\'),a.2K("1B/bf.1C",\'

<8K>1S X-bh

1r 2i 20 1N 1F 2p 2d W 1H 1J 1i 1P 1s 4o 1j <1f F-1g="6T()">7j \'),a.2K("1B/3d.1C",\' bG 4j {{9.20}} {{9.2d}} {{9.1s}} &2g; &2g; &2g; &2g; 7j bI &2g; {{9.2T}} bL 2N <4k-31 F-19="9.1e" y="3r-2B-2N-31" 4J-J="bK" bx-J="8i"><4k-31> 8B 2S &2g; 8p &2g; 8G 6c &2g; aQ &2g; {{9.4i}} 8f 2t &2g; {{9.2F}} {{9.8E}} aR 8x aT (aS = 4l 8x aM) {{9.5M}} 8B# aG 43 &2g; aH &2g; <1f F-1g="89()" y="8g-1f" F-aI="8k()">&2g;aU <4m F-5s="aV/8M.b7" y="8M"> V{{9.3E}} \'),a.2K("1B/3q.1C",\' <4m y="3q-76" F-5s="{{ 73 }}"> aW 1S {{1c.1D}} b2 4j {{1c.69}} <3o Z="6R" 81="4m" 62="{{1c.69}}" 4r="4V.4r"> {{1c.6I}} {{1c.7C}} <3o Z="6R" 81="4m" 62="{{1c.7C}}" 4r="4V.4r"> 9z 4q {{1c.5R}}{{1c.a9}} aa <7P y="D-M-O 1o-D-M-O 6g" F-4f="O 4d 1c.6g"> {{ O }} \')}]);',62,789,'|||||||||sdkData|||||||||||||||||||||||||class|div||function|span|list|var|ng|isInternalDebugging|console|log|label|if|value|group|toString|item|length|right|fa|form|return|pull||mp_merchant_ID||input|type||||text|sm|control||col|CryptoJS|model|JSON|substring|C5ResultData|Step|new_credit_card|button|click|sdkConstants|mp_app_name|mp_channel|stringify|else|null|left|modal|current_token|commErrorHandler|mp_verification_key|mp_amount|String|catch|result|angular|window|controller|Error|try|views|html|channel|show|mp_bill_name|errorDesc|mp_bill_email|Invalid|mp_bill_mobile|void|data|MPdomain|mp_username|mp_request_type|mp_password|mp_credit_card_expiry|replace|MOLPay|mp_editing_enabled|found|filter|close|API|Payload|mp_encrypt_credentials|mp_order_ID|mp_credit_card_cvv|available_token|placeholder|mobile|rootScope|php|callNativeWebview|AES|module|molpayXsdkApp|CurrentMsgType|index|mp_currency|mp_credit_card_no_display|bcard_no|nbsp|not|mp_bill_description|mp_transaction_id|mp_credit_card_country|body|center|search|trim|mp_country|then|scope|status|name|seed|encode|available_channel|templateUrl|circle|Payment|times|credit|HttpPost|billing|lg|mp_credit_card_bank|dismiss|token|nresult|SHA1|put|path|mp_filter|card|testMerchantCredentialsCallback|The|case|finalizingpayment|number|mp_channel_title|opt|decrypt|mod|InternalUsed|requestPath|enc|mp_channel_editing|switch|mp_bin_lock|mp_credit_card_no|Utf8|url|MobileNewApiUrl|hide|www|device_info|GaTrackEvent|animation|open|paymentinfo|isLoading|SHA256|break|container|resolve|payment|updateSdkData|watch|alertdata|MY|barcode|B4ResultData|receipt|new|size|Receipt|Please|PasswordHash|password|MD5|Type|aligned|BIN|gaTrackEvent|json|l_version|sdk_version|application|readonly|status_code|select|encrypt|of|bcard_pin|location|transactionRequest|multi|all|month|document|in_app_mode|msgType|merchant_id|parse|ApiC5|B4ResultUrl|year|htmlStringBase64|nhtmlStringBase64|sha1|nativeWebTransactionResults||Check|indexOf|variables|uibModalInstance|B3Handler|D7ResultData|checksum|chksum|bin_checked|in|bin_checking_in_progress|repeat|molpay|country|mp_credit_card_country_title|ID|toggle|100|img|tel|mp_debug_mode|footer|amount|options|exp|base64|please|pointbcard|chevron|Lock|NoChannelFoundCheckCurrencyValue|failed|GetBankListUrl|T1Url|C5|D7|controllerAs|GetAvailableChannelByIdUrl|OnApiResponseReceived|POST|xxxx|on|Billing|billinginfo|cvv|merchantID|mp_ga_enabled|generate|localStorage|module_id|setTimeout|check|addCustomCSS|vm|inAppCallback|isDeploy|cdomain|AccessDeniedMidAppnameVerificationkey|expdate|when|mp_preferred_token|authData|vcode|searchString|wrapper_version|CommunicationError|token_status|mp_is_escrow|Basic|method|marginless|alertmodal|listgroup|AlertModalCtrl|maskname|available_banklist|errorTitle|CLOSE|IsDebitCardUrl|bill_mobile|app_name|row|headers|testMerchantCredentials|bill_email|VcodeHash|src|SecuredEncryptionFailed|icon|Android|ChecksumForD7|ApiD7|Accept|Content|information|getCountries|title|factory|ApiHandlerService|and|isBelowAndroid44|binValue|bcard|Data|urlencoded|closemolpay|bcard_point|BinLockCheck|with|replaceAll|ApiT1|cur|uuid4|deviceDetector|molpayResultString|device|header|mp_ga_userid|AuthenticationService|getChannelLogoFromChannelName||nativeWebCloseAllWindows|string|PaymentInfoCtrl|bin4|bin|nativeWebRunScriptOnPopup|xdk|https|txn_ID|request|bar|date|AmountNotFound|ApiGetAvailableChannelById|PaymentRecordsLogUrl|notes|Malaysia|domain_mode|com|isStarting|css|mp_custom_css_url|app|webview_url_prefix|bill_name|pInstruction|B3|E9ResultData|email|GetBankListHandler|error_message|GetAvailableChannelByIdHandler|T1Handler|credit3|split|B4Handler|D7Handler|C5Handler|E9Handler|coreVersion|h4|block|statusText|pcode_lbl|checkIfThisIsAValidCountryCode|InvalidCountryCode|logo_url|VerificationKeyNotFound|Search|response|beam|ga|code128c|CountryNotFound|onPayClicked|mp_is_secure|getElementById|element|display|onChannelListClicked|encodeURIComponent|ApiB3|mp_transaction_request_type|ApiGetBankList|toplogourl|PaymentStatus|onBillingInfoChanged|logo|unknown|getChannelMasknameFromChannelName|PreloadData|currency|PasswordNotFound|MerchantIdNotFound|AppNameNotFound|OrderIdNotFound|MPSecondaryDomain|UsernameNotFound|toFixed|nativeWebOpenMOLPayWindow|Pay|CurrencyNotFound|banklistmodal|resultform|ReceiptCtrl|Run|BCard|hlbFailedString|onCardSelected|uibModal|timeout|http|hlbSuccessString|script|popup|E9|extend|callback|onChannelSelected|pcode|channelmodal|luhn|closeAll|_|iphone|cardlistmodal|maybankSuccessString|Main|bank|PaymentInfo|MOLPayPayment|aid|li|timeoutHttpIntercept|recordsLog|GetAvailableChannelById|GetBankList|IsDebitCard|mobile_new|gaClientId|mpUserId|onBankSelected|nurl|countrylistmodal|render|chips|uid|TransactionIdForReceiptRequestNotFound|generated|h5|RegExp|Countries|proceedClicked|CountrylistModalCtrl|pin|CardlistModalCtrl|xxx|mp_bin_lock_err_msg|Bank|proceed|issuer_bank|No|countryArray|proceedDisabled|parseInt|onCountrySelected|FinalizingPaymentCtrl|Authorization|CVV|responded|Boolean|larger|error_code|point|Version|SDK|BCARD|onCardNumberClicked|or|UnhandledErrorContactSupport|Card|ChannelModalCtrl|bank_country|credit_disclaimer|ChecksumForC5|Exp|focus|MPMainDomain|updateBCardPoints|h2|run|poweredByMOLPay|orderid|onCountrylistClicked|MM|B4|bill_desc|disclaimer|createTextRange|onBanklistClicked|ApiB4|BanklistModalCtrl|IsDebitCardCheck|verification|returned|B2C_paymentProcessed|change|Communication|internet|nativeWebRequestUrlUpdatesOnFinishLoad|connection|key|B2C_paymentFailed|link|Maybank2U|unescape|assign|success|mprunscriptonpopup|parameters|maha|nativeWebRequestUrlUpdates|interceptors|denied|submit|routeProvider|redirectTo|config|otherwise|Access|use|merchant|username|m2uTicketsPaymentConfirmed|id|1e4|mptransactionresults|httpProvider|do|HLB|Payable|_self|target|Online|creditCardInput|nativeWebClosePopupAndRunScriptOnMOLPayWindow|mpopenmolpaywindow|setCaretPosition|countries|mpopenpopup|move|typeof|ngRoute|leodido|ngSanitize|gi|userAgent|raw|directive|isString|nativeWebOpenPopup|injector|setSelectionRange|add|fileUrl|strict|my|selectionStart|pay|isNumber|parseFloat|exec|character|apply|ngTouch|error|payable_amt|Note||onlinepayment|support|contact|mpclosepopupandrunscriptonmolpaywindow|Status|Unhandled|enableInAppMode|restrict|push|getDeviceInfo|Secured||mpcloseallwindows|MYR|this|mp_url_scheme|mp_authData|ui|prototype||transactionRequestWithOrderId|cssInjector|encryption|FastClick|attach|bootstrap|for|Http|digit|Last|6298|Pin|disabled|spin|spinner|debit|Points|removed|splice|YYYY|Country|Use|RM1|points|PROCEED|images|Services|T1|is_escrow|message|ApiRecordsLog|checksumString|Transaction|bank_name|cardnumber|ApiE9|MOLWallet|png|order_ID|transactionRequestWithTransactionId|version|mp|Initiate|Success|default|main|wait|Platform|horizontal|GenBarcodeHandler|checkbox|Response|doesn|Close|templateCache|debit_credit|vertical|Finalizing|have|handler|ApiGenBarcode|CommError|tranID|off|just|YY|nerrorResult|nJSON|cvc|send|results|description|Order|offset|through|creditcard|Yes|New|Result|Get|2Fpaymentinfo|dt|dp|textAlign|none|event|monospace|font|quite|height|el|ea|displayValue|ec|cid|fontSize|eLabel|tid|eAction|eCategory|000|lineColor|UA|backgroundColor|setItem||available|reuse|existing|29894240|getItem|analytics|google|1002|1003|nwebview_url_prefix|1001|code|Params|OK|Returned|HttpGet|convertSafeBase64StringBackToOriginalVersion|mID|appName|md5|Sent|Not|GET|Request|sent|Checksum|Proceed|MainCtrl|LUHN|collect|width'.split('|'),0,{})) diff --git a/MOLPayXDKExample/platforms/android/assets/www/plugins/molpay-mobile-xdk-cordova/molpay.js b/MOLPayXDKExample/platforms/android/assets/www/plugins/molpay-mobile-xdk-cordova/molpay.js index c7a2cff..8592df9 100644 --- a/MOLPayXDKExample/platforms/android/assets/www/plugins/molpay-mobile-xdk-cordova/molpay.js +++ b/MOLPayXDKExample/platforms/android/assets/www/plugins/molpay-mobile-xdk-cordova/molpay.js @@ -1,3 +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://",molpayresulturl="https://www.onlinepayment.com.my/MOLPay/result.php",molpaynbepayurl="https://www.onlinepayment.com.my/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){isInternalDebugging&&console.log("postMolpayResultHandler innHtml = "+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),isInternalDebugging&&console.log("innHtmlString = "+b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(isInternalDebugging&&console.log("onMolpayUiFrameLoad B4 results = "+b),g=JSON.parse(b))){var h=g.tranID;h&&(isInternalDebugging&&console.log("mainUiFrame.contentWindow.transactionRequestWithTransactionId = "+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){isInternalDebugging&&console.log("onBankUiLoadstop event.url ="+a.url);var b;b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpaynbepayurl found"),bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){isInternalDebugging&&console.log("bankUiWindow window.open to window.location inject ok")}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){isInternalDebugging&&console.log("bankUiWindow window.close to window.location.assign inject ok")}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){isInternalDebugging&&console.log("onBankUiLoadstart event.url = "+a.url);var b;if(b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstart molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b),postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)){isInternalDebugging&&console.log("onBankUiLoadstart molpaynbepayurl found");var c=10,f=0,g=setInterval(function(){h()},1e3),h=function(){f++,f>c?clearInterval(g):bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b);var c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(g))})}}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){var b,c;if(a&&a.indexOf(mpopenmolpaywindow)>-1)c=new RegExp(mpopenmolpaywindow,"g"),b=a.replace(c,""),b&&b.length>0&&(isInternalDebugging&&console.log("inAppCallback base64HtmlString = ",b),createBankUiWindow(b));else if(a&&a.indexOf(mptransactionresults)>-1&&(c=new RegExp(mptransactionresults,"g"),b=a.replace(c,""),b&&b.length>0)){var d=window.atob(b),e=JSON.stringify(JSON.parse(d));transactionResultCallback(e),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(c=new RegExp(mprunscriptonpopup,"g"),b=a.replace(c,""),b&&b.length>0)){var f=window.atob(b);isInternalDebugging&&console.log("run script on popup, script ="+f),bankUiWindow.executeScript({code:f},function(a){isInternalDebugging&&console.log("run script on popup ok")})}},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isInternalDebugging&&console.log("MOLPay startmolpay paymentdetails = "+JSON.stringify(a,null,"")),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(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){isInternalDebugging&&console.log("MOLPay transactionRequest paymentdetails = "+JSON.stringify(a,null,""));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(){isClosingMolpay=!0,mainUiFrame.contentWindow.transactionRequest()};var molpay=new MOLPay;module.exports=molpay; +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://",molpayresulturl="https://www.onlinepayment.com.my/MOLPay/result.php",molpaynbepayurl="https://www.onlinepayment.com.my/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){isInternalDebugging&&console.log("postMolpayResultHandler innHtml = "+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),isInternalDebugging&&console.log("innHtmlString = "+b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(isInternalDebugging&&console.log("onMolpayUiFrameLoad B4 results = "+b),g=JSON.parse(b))){var h=g.tranID;h&&(isInternalDebugging&&console.log("mainUiFrame.contentWindow.transactionRequestWithTransactionId = "+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){isInternalDebugging&&console.log("onBankUiLoadstop event.url ="+a.url),mainUiFrame.contentWindow.nativeWebRequestUrlUpdatesOnFinishLoad({requestPath:a.url});var b;b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpaynbepayurl found"),bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){isInternalDebugging&&console.log("bankUiWindow window.open to window.location inject ok")}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){isInternalDebugging&&console.log("bankUiWindow window.close to window.location.assign inject ok")}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){isInternalDebugging&&console.log("onBankUiLoadstart event.url = "+a.url);var b;if(b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstart molpayresulturl found"),mainUiFrame.contentWindow.nativeWebRequestUrlUpdates({requestPath:a.url})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)){isInternalDebugging&&console.log("onBankUiLoadstart molpaynbepayurl found");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];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b);var c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(f))})}}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){var b,c;if(a&&a.indexOf(mpopenmolpaywindow)>-1)c=new RegExp(mpopenmolpaywindow,"g"),b=a.replace(c,""),b&&b.length>0&&(isInternalDebugging&&console.log("inAppCallback base64HtmlString = ",b),createBankUiWindow(b));else if(a&&a.indexOf(mpcloseallwindows)>-1)isInternalDebugging&&console.log("inAppCallback closing bankUiWindow"),bankUiWindow.close();else if(a&&a.indexOf(mptransactionresults)>-1&&(c=new RegExp(mptransactionresults,"g"),b=a.replace(c,""),b&&b.length>0)){var d=window.atob(b),e=JSON.stringify(JSON.parse(d));transactionResultCallback(e),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(c=new RegExp(mprunscriptonpopup,"g"),b=a.replace(c,""),b&&b.length>0)){var f=window.atob(b);isInternalDebugging&&console.log("run script on popup, script ="+f),bankUiWindow.executeScript({code:f},function(a){isInternalDebugging&&console.log("run script on popup ok")})}},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isInternalDebugging&&console.log("MOLPay startmolpay paymentdetails = "+JSON.stringify(a,null,"")),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){isInternalDebugging&&console.log("MOLPay transactionRequest paymentdetails = "+JSON.stringify(a,null,""));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(){isClosingMolpay=!0,mainUiFrame.contentWindow.transactionRequest()};var molpay=new MOLPay;module.exports=molpay; }); diff --git a/MOLPayXDKExample/platforms/android/platform_www/cordova_plugins.js b/MOLPayXDKExample/platforms/android/platform_www/cordova_plugins.js index 0ff4a52..07abdd3 100644 --- a/MOLPayXDKExample/platforms/android/platform_www/cordova_plugins.js +++ b/MOLPayXDKExample/platforms/android/platform_www/cordova_plugins.js @@ -27,7 +27,7 @@ module.exports.metadata = "cordova-plugin-whitelist": "1.2.1", "cordova-plugin-inappbrowser": "1.4.0", "cordova-plugin-privacyscreen": "0.3.1", - "molpay-mobile-xdk-cordova": "2.0.0" + "molpay-mobile-xdk-cordova": "2.2.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 c013960..e2abc45 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 @@ -

Loading.

Please wait.

Loading...
\ No newline at end of file +

Loading.

Please wait.

Loading...
\ No newline at end of file diff --git a/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/scripts.f29f8607.js b/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/scripts.f29f8607.js new file mode 100644 index 0000000..d29f2bb --- /dev/null +++ b/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/scripts.f29f8607.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}('"9p 9Y";1w.29("2a",["9L","9N","a7","ab-4t","F.5T","at.aB","9D","9f.9H","4k-31","3o","5S","1w.6l.9U","9M.7E"]).9R("4L",["$25",B(a){T{aj:"A",98:B(b,c,d){c.4J("91",B(){a.75()})}}}]).5D("7Q",B(){T{6a:B(a){T a.7t=9u,a}}}).9m(["$9k","$9w",B(a,b){a.51("/",{2x:"1B/3d.1C",1y:"63",4E:"3d"}).51("/3d",{2x:"1B/3d.1C",1y:"63",4E:"3d"}).51("/3q",{2x:"1B/3q.1C",1y:"7n",4E:"3q"}).51("/2R",{2x:"1B/2R.1C",1y:"8n",4E:"2R"}).9n({9l:"/"}),b.9h.ak("7Q")}]).8L(["$25","$3M","$7u","4t","5Y","5T","88","$1V","5E","ax","5S",B(a,b,c,d,e,f,g,h,i,j,k){az.aA(3R.2l),1t.au.5P=B(a,b,c){T aq.1R(3r 87(a.1R(/([\\/\\,\\!\\\\\\^\\$\\{\\}\\[\\]\\(\\)\\.\\*\\+\\?\\|\\<\\>\\-\\&])/g,"\\\\$&"),c?"9O":"g"),"62"==9K b?b.1R(/\\$/g,"$$$$"):b)},a.55=B(a,b){E c=3r 87(a,"g"),d=c.a4(b);T d},a.4X=!0,a.G=!1,a.6E="2.2.",a.4X||(a.G=!0),a.8I="68://38.ac.6j.9Z/",a.7f="68://a1.4g.6j/",a.1M=a.8I,a.6f=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7R",a.4F=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7S",a.4A=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7T",a.5k=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7U",a.36=a.1M+"1S/1X/7V/2c.26",a.4B=a.1M+"1S/1X/82/2c.26",a.3X="",a.2b="",a.3p="",a.9T="9I://",a.7i="9F://",a.61="ao://",a.9E="af://",a.66="9d://",a.42="9v://",a.5U=a.1M+"1S/1v.26",a.7J="9s.9x",a.7v="90",a.7q="97",a.3e=!1,a.6k=!0,a.3S=!1,a.1h={57:"92 1z, 4u 4T 93 95, 9r, 8z 3w",4Z:"9o 9i, 4u 4T 9q 9t, 6n 2t, 8z 8Y 96",4y:"8i 1D 1U, 4u 4T 7a L",7g:"1N L 2h 1U",7b:"1P L 2h 1U",7c:"W L 2h 1U",7d:"1i L 2h 1U",7e:"20 L 2h 1U",6d:"1s L 2h 1U",7k:"2d L 2h 1U",6S:"2p L 2h 1U",6K:"1I 2p L",6M:"1r L 2h 1U",84:"2j L aC 3q 6a 2h 1U",8A:"ah a8, 4u ae ad",5t:"am ay 4z"},a.9={1N:"",1P:"",W:"",1i:"",20:"",1s:"",2d:"ap",2p:"3n",1r:"",1Z:!0,6U:!1,1j:"",30:!0,1T:"",1F:"",1H:"",1J:"",2i:"",59:"0",4o:!1,ar:"",2j:"",1O:"",4b:"",3D:"2",as:"",3E:"",39:"",56:"",4R:"4g-24-67-38",33:"",21:"",1Q:"",2F:"",3Q:"",3Y:"",2H:"",1e:!0,2k:"3n",4i:"6h",2e:"",2f:"",3L:"",5M:"",58:"1",2w:"",22:"",1p:"",5h:"",2T:"",4O:!1,5X:"",2M:"0",4c:!1,4e:!1,6m:"",4Y:"",6i:"",8E:"",6o:"",32:"",8e:"",52:""},!a.4X,a.$3l("9.2k",B(){E b=g.5B(),c=h("1V")(b,a.9.2k,!0);c.P?a.9.4i=c[0][1]:a.9.2k=""}),a.$3l("9.1Q",B(){K(a.9.1Q){E b=1t(a.9.1Q);b=b.1R(/\\//g,"");E c="";b.P>4&&(b=b.1b(0,4)),1===b.P&&(c=8l(b.1b(0,1)),c>1&&(b="")),2===b.P&&(c=8l(b.1b(0,2)),c>12&&(b=b.1b(0,1))),b.P>2&&(b=b.1b(0,2)+"/"+b.1b(2,b.P)),a.9.1Q=b,5===a.9.1Q.P&&(a.9.3Q=a.9.1Q.1b(0,2),a.9.3Y=a.9.1Q.1b(3,5))}}),a.$3l("9.2f",B(){K(a.9.2f){E b=1t(a.9.2f);b.P>10&&(b=b.1b(0,10)),a.9.2f=b}}),a.$3l("9.1e",B(){K(a.9.1e)a.9.33="",a.9.2e="",a.9.21="",a.9.1Q="",a.9.2F="",a.9.2k="3n",a.9.4i="6h",a.9.3Q="",a.9.3Y="",a.9.2H="";1l K(a.9.22){K(a.9.22.P>0&&!a.9.1p)K(a.9.52){E b=h("1V")(a.9.22,a.9.52,!0);K(b.P){a.G&&H.I("52 1U : ",b[0]);E c=a.9.22.45(b[0]);a.9.1p=a.9.22[c]}1l a.9.1p=a.9.22[0]}1l a.9.1p=a.9.22[0];a.9.2e=a.9.1p.65+"******"+a.9.1p.64,a.9.21="",a.9.1Q=a.9.1p.50.1b(2,4)+"/"+a.9.1p.50.1b(0,2),a.9.2F=a.9.1p.8h,a.9.2k=a.9.1p.8D,a.9.2H=a.9.1p.2H}}),a.$3l("9.1p",B(){!a.9.1e&&a.9.1p&&(a.9.2e=a.9.1p.65+"******"+a.9.1p.64,a.9.21="",a.9.1Q=a.9.1p.50.1b(2,4)+"/"+a.9.1p.50.1b(0,2),a.9.2F=a.9.1p.8h,a.9.2k=a.9.1p.8D,a.9.2H=a.9.1p.2H)}),a.9G=B(a,b){K(1m!==a)K(a.8T){E c=a.8T();c.9J("a5",b),c.3I()}1l a.a0?(a.8H(),a.9V(b,b)):a.8H()},a.5G=B(){T a.55("5v 4.1",a.9.39)||a.55("5v 4.2",a.9.39)||a.55("5v 4.3",a.9.39)?!0:!1},a.$3l("9.2e",B(){K(a.9.2e){E b=1t(a.9.2e);K(b=b.1R(/ /g,""),6===b.P&&a.9.2M&&"1"===a.9.2M&&e.8X(b),6===b.P&&a.9.32&&a.9.32.P>0){E c=e.5N(b);c&&(a.9.2e="")}b.P>16&&(b=b.1b(0,16)),a.5G()||(b.P>4&&b.P<=8?b=b.1b(0,4)+" "+b.1b(4,b.P):b.P>8&&b.P<=12?b=b.1b(0,4)+" "+b.1b(4,8)+" "+b.1b(8,b.P):b.P>12&&b.P<16&&(b=b.1b(0,4)+" "+b.1b(4,8)+" "+b.1b(8,12)+" "+b.1b(12,b.P))),16===b.P&&(a.9.33=b,b=b.1b(0,4)+" "+b.1b(4,8)+" "+b.1b(8,12)+" "+b.1b(12,16)),b&&(a.9.2e=b)}}),a.$3l("9.21",B(){K(a.9.21){E b=1t(a.9.21);b.P>4&&(b=b.1b(0,4)),a.9.21=b}}),a.75=B(){!a.9.22&&a.9.1F&&a.9.1H&&a.9.1J&&e.5Q()},a.4U=B(b){a.G&&H.I("9X: "+b),j.9W(b)},a.6J=B(a){E b=!1,c=g.5B(),d=h("1V")(c,a,!0);T d.P&&(b=!0),b},a.78=B(b){a.G&&H.I("78: "+b);E c="",d=h("1V")(a.9.2w,{2t:b},!0);T d.P&&(c=d[0].5g),c},a.8J=B(){E b=a.9.1s,c=a3(b);c=4l*c,a.9.5M=c.7h(0)},a.3k=B(){K(!a.9.1s)T 1K i.1q({1z:a.1h.6d});K(1w.a2(a.9.1s))a.9.1s=a.9.1s.7h(2);1l K(1w.9S(a.9.1s)){E b=h("2S")(a.9.1s,2);K(a.9.1s=b,!a.9.1s)T 1K i.1q({1z:a.1h.6d})}K(!a.9.1N)T 1K i.1q({1z:a.1h.7g});1A{a.9.1N=1t(a.9.1N.2o())}1u(c){a.G&&H.I(c)}K(!a.9.1P)T 1K i.1q({1z:a.1h.7b});1A{a.9.1P=1t(a.9.1P.2o())}1u(c){a.G&&H.I(c)}K(!a.9.W)T 1K i.1q({1z:a.1h.7c});1A{a.9.W=1t(a.9.W.2o())}1u(c){a.G&&H.I(c)}K(!a.9.1i)T 1K i.1q({1z:a.1h.7d});1A{a.9.1i=1t(a.9.1i.2o())}1u(c){a.G&&H.I(c)}K(!a.9.20)T 1K i.1q({1z:a.1h.7e});1A{a.9.20=1t(a.9.20.2o())}1u(c){a.G&&H.I(c)}K(!a.9.2d)T 1K i.1q({1z:a.1h.7k});1A{a.9.2d=1t(a.9.2d.2o())}1u(c){a.G&&H.I(c)}K(!a.9.2p)T 1K i.1q({1z:a.1h.6S});1A{a.9.2p=1t(a.9.2p.2o())}1u(c){a.G&&H.I(c)}K(!a.6J(a.9.2p))T 1K i.1q({1z:a.1h.6K});K(!a.9.1r)T 1K i.1q({1z:a.1h.6M});1A{a.9.1r=1t(a.9.1r.2o())}1u(c){a.G&&H.I(c)}K((1K 0===a.9.1Z||1m===a.9.1Z)&&(a.9.1Z=!0),a.9.1N&&a.9.1P&&a.9.1r&&a.9.W&&a.9.1i&&a.9.1Z)1A{K(!a.2u){a.2u=k.4P().N();E g=18.3f(a.9.W+a.9.1i+a.2u).N();a.9.1N=18.28.3J(a.9.1N,g).N(),a.9.1P=18.28.3J(a.9.1P,g).N(),a.9.1r=18.28.3J(a.9.1r,g).N()}}1u(c){i.1q({1z:a.1h.5t})}1l a.9.53="5a "+d.2v(a.9.1N+":"+a.9.1P);K(1K 0===a.9.56&&(a.9.56="x"),a.9.3E=a.6E+a.9.56,a.9.39=f.9Q.9P,a.9.3D="2",a.9.58="1",1K 0===a.9.59&&(a.9.59="0"),a.9.6U=!1,a.9.2M||(a.9.2M="0"),1K 0===a.9.4O&&(a.9.4O=!0),a.9.4R||(a.9.4R="4g-24-67-38"),a.9.30||(a.9.30=!1),a.9.1j?"3O"===a.9.1j&&(a.9.30=!0,a.9.2T="(3u 3I a 1D)"):(a.9.1j="3O",a.9.30=!0,a.9.2T="(3u 3I a 1D)"),a.9.1T||(a.9.1T=!1),a.9.1F&&a.9.1H&&a.9.1J&&a.9.2i&&a.9.1F||(a.9.1T=!0),a.9.1H)1A{a.9.1H=1t(a.9.1H.2o())}1u(c){a.G&&H.I(c)}K(a.9.1J)1A{a.9.1J=1t(a.9.1J.2o())}1u(c){a.G&&H.I(c)}K(a.9.2i)1A{a.9.2i=1t(a.9.2i.2o())}1u(c){a.G&&H.I(c)}K(a.9.1F)1A{a.9.1F=1t(a.9.1F.2o())}1u(c){a.G&&H.I(c)}T a.9.4o||(a.9.4o=!1),a.9.2k="3n",a.9.4i="6h",a.9.1e=!0,"3t"!==a.9.1O||a.9.2j?(a.9.6m?(4S(B(){a.$a6(a.4U(a.9.6m))},0),4S(B(){1w.6W(3R.6V("6n-2l")).6l({6X:"6G"}),a.6k=!1},4l)):(1w.6W(3R.6V("6n-2l")).6l({6X:"6G"}),a.6k=!1),(a.9.6i||a.9.4Y)&&("1"===a.9.6i?a.1M=a.7f:a.9.4Y&&(a.1M=a.9.4Y),a.6f=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7R",a.4F=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7S",a.4A=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7T",a.5k=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7U",a.36=a.1M+"1S/1X/7V/2c.26",a.4B=a.1M+"1S/1X/82/2c.26",a.5U=a.1M+"1S/1v.26"),1K(a.9.1O&&"ag"===a.9.1O?a.3N():e.79())):1K i.1q({1z:a.1h.84})},a.al=B(){T a.9.39},a.5Z=B(b){a.G&&H.I("5Z: "+b);E c="",d=h("1V")(a.9.2w,{2t:b},!0);T d.P&&(c=d[0].6L),c},1x.ai=B(){a.3S=!0},1x.3k=B(b,c){a.9={},c&&(a.4W=c),a.G&&H.I("1x.3k, 7A = "+c);1A{a.9=1a.3V(b)}1u(d){a.9=1w.7z(a.9,b)}a.G&&H.I("1x.3k: $25.9 = "+1a.1k(a.9)),a.3k()},1x.9g=B(b){E c=b.2Y;1A{c=1a.3V(b).2Y}1u(d){c=b.2Y}a.G&&H.I("1L.2Y: "+c);E f="";c.45(a.5U)>-1&&(a.G&&H.I("8Q 1v 8Z"),a.3X=c,e.8V(),f=a.61,a.27(f))},1x.94=B(b){E c=b.2Y;1A{c=1a.3V(b).2Y}1u(e){c=b.2Y}a.G&&H.I("1L.2Y: "+c);E f="",g="",h="",i="";c.45(a.7J)>-1?(a.G&&H.I("99 3j 9c 2L: "+c),g="1x.3M.9b(9a(9e))",h="4S(B(){"+g+"; }, 4l);",i=d.2v(h),f=a.66+i,a.G&&H.I("7o 7w 4J 7x, 35 = "+f),a.27(f)):(c.45(a.7v)>-1||c.45(a.7q)>-1)&&(a.G&&H.I("9y 9C 3j 1v 2L: "+c),g=\'3R.7m.9B="9A"; 3R.7m.9j();\',h="4S(B(){"+g+"; }, 4l);",i=d.2v(h),f=a.66+i,a.G&&H.I("7o 7w 4J 7x, 35 = "+f),a.27(f))},a.7F=B(){E b=a.61;a.27(b)},a.5L=B(){e.5x(),a.7F()},1x.5L=B(){a.5L()},a.3N=B(){"3t"===a.9.1O&&a.9.2j&&""!==a.9.2j?a.3W():a.9.2j&&""!==a.9.2j?a.3W():e.5x()},1x.3N=B(){a.3N()},1x.aw=B(b){b&&(a.9.20=b),a.3N()},1x.b9=B(b){b&&(a.9.2j=b),a.3N()},1x.cu=B(a){E b=1t(a),c=f.5V;T a&&"7H"===c&&(b=b.1R(/\\-/g,"+"),b=b.1R(/\\7G/g,"=")),b},1x.4U=B(b){a.4U(b)},1x.5p=B(b,c){a.9={},a.G&&H.I("1x.5p, 7A = "+c),c&&(a.2O=c);1A{a.9=1a.3V(b)}1u(f){a.9=1w.7z(a.9,b)}K(a.G&&H.I("1x.5p: $25.9 = "+1a.1k(a.9)),(1K 0===a.9.1Z||1m===a.9.1Z)&&(a.9.1Z=!0),a.9.1N&&a.9.1P&&a.9.1r&&a.9.W&&a.9.1i&&a.9.1Z)1A{K(!a.2u){a.2u=k.4P().N();E g=18.3f(a.9.W+a.9.1i+a.2u).N();a.9.1N=18.28.3J(a.9.1N,g).N(),a.9.1P=18.28.3J(a.9.1P,g).N(),a.9.1r=18.28.3J(a.9.1r,g).N()}}1u(f){i.1q({1z:a.1h.5t})}1l a.9.53="5a "+d.2v(a.9.1N+":"+a.9.1P);e.6e()},a.27=B(b){E c=b,d=f.5V;a.G&&H.I("27 5V Z:"+1a.1k(d,1m,"")),a.G&&H.I("27: \\7Z: "+c),a.4W?(a.4W(b),a.G&&H.I("$25.27, $25.4W 35 = "+b)):("7H"===d&&(c=b.1R(/\\+/g,"-"),c=c.1R(/\\=/g,"7G")),a.9.6o&&(c=a.9.6o+c,a.G&&H.I("27: \\cn: "+c)),1x.3M=c)},a.6T=B(){a.3k(),b.2L("/3d").1R()},a.4X||a.3k()}]),1w.29("2a").1y("cF",B(){}),1w.29("2a").1y("63",["$2r","$25","$3M","$7s","5Y","7E",B(a,b,c,d,e,f){a.8k=B(){E a=!1;T b.9.2M&&b.9.1e&&"1"===1t(b.9.2M)&&(b.9.4c||(a=!0)),a},a.8y=B(){K(!b.9.1e){E c=d.3c({3b:!0,2x:"1B/7I.1C",1y:"8c",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.6Y=B(){K(b.9.30){E c=d.3c({3b:!0,2x:"1B/7D.1C",1y:"8C",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.8O=B(){K(b.9.1e){E c=d.3c({3b:!0,2x:"1B/80.1C",1y:"8a",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.8U=B(){K(b.9.1e){E c=d.3c({3b:!0,2x:"1B/7l.1C",1y:"8W",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.89=B(){E a=!1,c={};K(c.5i="1I 3j 5A",c.1G="",b.9.1F)K(0===b.9.1F.P)a=!0,c.1G="1I 2D 2t";1l K(b.9.1H)K(0===b.9.1H.P)a=!0,c.1G="1I 2D 6t";1l K(b.9.1J)K(0===b.9.1J.P)a=!0,c.1G="1I 2D 24";1l K("3O"===b.9.1j)a=!0,c.1G="3u 3I a 3j 1D";1l K("2B"===b.9.1j||"6y"===b.9.1j)K(!b.9.33||b.9.33.P<16)a=!0,c.1G="1I 2B 2N 2S";1l K(!f.4T(b.9.33)&&b.9.1e)a=!0,c.1G="1I 2B 2N 2S (cG)";1l K(!b.9.21||b.9.21.P<3)a=!0,c.1G="1I 4M 2S";1l K(!b.9.1Q||b.9.1Q.P<5)a=!0,c.1G="1I 4s 6c";1l K(b.9.2F){K(b.9.32&&b.9.32.P>0&&(a=e.5N(b.9.33)))T}1l a=!0,c.1G="1I 7L 2t";1l"4v"===b.9.1j&&(!b.9.2f||b.9.2f.P<10?(a=!0,c.1G="1I 7p 2S"):b.9.3L||(a=!0,c.1G="1I 7p 8b"));1l a=!0,c.1G="1I 2D 24";1l a=!0,c.1G="1I 2D 6t";1l a=!0,c.1G="1I 2D 2t";K(a){E g=d.3c({3b:!0,2x:"1B/5d.1C",1y:"5f",3s:"14",3i:{3m:B(){T c}}});g.1v.2q(B(){},B(){})}1l e.70(),b.3a("2z","cE",b.9.1j.N())}}]),1w.29("2a").1y("7n",["$2r","$25",B(a,b){a.4V={},a.4V.4r={cI:2,bX:60,bW:10,c0:!1,bV:"bU",bR:"2m",c3:12,cb:"",c9:"#c8"},a.73=b.5Z(b.1c.1D)}]),1w.29("2a").5D("5Y",["4t","$7u","$25","$7t","5T","5E","$3M","5S","$7s","$1V",B(a,b,c,d,e,f,g,h,i,j){E k={};T c.3a=B(a,d,e){K(c.9.4O){c.G&&H.I("3B, c7 = "+a+", c6 = "+d+", c4 = "+e);E f="v=1",g="&c5=ca-ch-7",i=c.9.5X;1x.4Q&&!i?(i=1x.4Q.ci("7X"),i?c.G&&H.I("3B, cg 7W 1U, cf 4j = "+i):(i=h.4P().N(),1x.4Q.cc("7X",i),c.G&&H.I("3B, 7W 2h 1U, 3r 4j 85 = "+i))):i||(i=h.4P().N(),c.9.5X=i,c.G&&H.I("3B, 4Q 2h ce, 3r 4j 85 = "+i));E j="&c2="+i,k="&83=bS";c.9.W&&(k="&83="+c.9.W.N());E l="&t=bT",m="&bQ=%bO",n="&bP=7N",o="&cd=7N",p="&an="+c.9.4R.N(),q="&7O=4g-24-67-38";c.9.1i&&(q="&7O="+c.9.1i.N());E r="&av="+c.9.3E.N(),s="&c1="+a.N(),t="&bZ="+d.N(),u="&bY="+e.N(),v="68://38.ck-cj.6j/cH?"+f+g+j+k+l+m+n+o+p+q+r+s+t+u,w={5b:"4H",35:v};b(w).2q(B(a){c.G&&H.I("3B, 6Q 6P cC, 6O = "+1a.1k(a))},B(a){c.G&&H.I("3B, 6Q 6P 4z, 6O = "+1a.1k(a))})}},k.3x=B(a){T 18.3x(a).N()},k.2J=B(a){T 18.2J(a).N()},k.1Y=B(a,b){T"cD="+a+"&cq="+1a.1k(b,1m,"")},k.2C=B(d,e){c.3e=!0;E g=c.9.53;K(c.9.1Z){E h=18.3f(c.9.W+c.9.1i+c.2u).N();g="5a "+a.2v(18.28.2V(c.9.1N.N(),h).N(18.2Z.34)+":"+18.28.2V(c.9.1P.N(),h).N(18.2Z.34))}E i={5b:"4H",35:d,5o:{5y:"3F/3C",8o:g,"5z-3y":"3F/x-38-S-5K","5J-3y":"3C","8w-8v":c.9.3E},1L:e};b(i).2q(B(a){K(c.3e=!1,a.1L.2s)c.G&&H.I("1X 8q 5O 1L 5F 2s:"+a.1L.2s),f.4G(d,a.1L.1v);1l K("cr"===a.6H){K(c.G&&H.I("1X cs: \\n"+1a.1k(a.1L,1m,"")),a.1L.2s===!1)31(a.1L.1v.cp){2Q co:2Q cl:c.G&&H.I(c.1h.4Z),f.1q({1z:c.1h.4Z}),c.2O&&c.2O(!1,c.1h.4Z);3g;2Q cm:c.9.1e=!0}(d===c.36||d===c.3X)&&f.4G(d,a.1L)}1l c.G&&H.I("aD 4H 6a 4z: "+a.6H)},B(){c.3e=!1,c.G&&H.I(c.1h.57),f.1q({1z:c.1h.57}),c.2O&&c.2O(!1,c.1h.57)})},k.ct=B(a){c.3e=!0;E d={5b:"cA",35:a,5o:{5y:"3F/3C","5z-3y":"3F/x-38-S-5K","5J-3y":"3C"}};b(d).2q(B(){c.3e=!1},B(){c.3e=!1,c.G&&H.I("cB cz cy")})},k.3v=B(){E a=c.9.1r;K(c.9.1Z){E b=18.3f(c.9.W+c.9.1i+c.2u).N();a=18.28.2V(c.9.1r.N(),b).N(18.2Z.34)}c.G&&H.I("(1d 1) 54:"+a);E d=k.3x(a).N(),e=c.9.W+c.9.1i+d;c.G&&H.I("(1d 2) cv + cw + cx(54):"+e);E f=k.2J(e).N();T c.G&&H.I("(1d 3) 2J(bM 3K 1d 2):"+f),f},k.5r=B(a){E b=c.9.1r;K(c.9.1Z){E d=18.3f(c.9.W+c.9.1i+c.2u).N();b=18.28.2V(c.9.1r.N(),d).N(18.2Z.34)}E e=c.9.1s,f=c.9.W,g=c.9.20,h=b,i=a,j=k.3x(e+f+g+h+i).N();T j},k.8F=B(){E a=c.9.1r;K(c.9.1Z){E b=18.3f(c.9.W+c.9.1i+c.2u).N();a=18.28.2V(c.9.1r.N(),b).N(18.2Z.34)}E d=c.9.1s,e=c.9.W,f=c.9.2j,g=a,h="4C",i=k.3x(e+h+f+d+g).N();T i},k.5w=B(){E a=c.9.1r;K(c.9.1Z){E b=18.3f(c.9.W+c.9.1i+c.2u).N();a=18.28.2V(c.9.1r.N(),b).N(18.2Z.34)}E d=c.9.1s,e=c.9.W,f=c.9.20,g=a,h="4D",i=e+h+f+d+g;c.G&&H.I("5w b1:"+i);E j=k.3x(i).N();T j},c.b0=B(a){E b=c.6f,d=c.9.W+a+c.9.39,e=d+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+e);E f=k.2J(e).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+f);E g={4N:c.9.W,aZ:a+c.9.39},h=k.1Y(f,g);c.G&&H.I("(1d 6) 2P 1Y:"+h),k.2C(b,h)},k.6e=B(){E a=c.4F,b=c.9.W+c.9.2d,d=b+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+d);E e=k.2J(d).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+e);E f={4N:c.9.W,7a:c.9.2d},g=k.1Y(e,f);c.G&&H.I("(1d 6) 2P 1Y:"+g),k.2C(a,g)},k.72=B(){E a=c.4A,b=c.9.W,d=b+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+d);E e=k.2J(d).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+e);E f={4N:c.9.W},g=k.1Y(e,f);c.G&&H.I("(1d 6) 2P 1Y:"+g),k.2C(a,g)},k.5Q=B(){E a="aX",b=c.9.2M,d=c.4B,e=6Z("+"),f=1t(c.9.1J).5P("+",e),g=c.9.W+c.9.1F+c.9.1H+c.9.1J+c.9.1i+a+b,h=g;c.G&&H.I("(1d 4) 3P 46:"+h);E i=k.2J(h).N(),j=i+k.3v();c.G&&H.I("(1d 5) 41(1v 3K 1d 4) + 4a 3w:"+j);E l={3U:c.9.W,6p:c.9.1F,5q:c.9.1H,5l:f,5m:c.9.1i,3T:a,1V:b},m=k.1Y(j,l);c.G&&H.I("(1d 6) 2P 1Y:"+m),k.2C(d,m)},k.79=B(){k.6e(),k.72(),c.9.1F&&c.9.1H&&c.9.1J&&k.5Q()},k.70=B(){c.2b="6r";E a=c.2b,b=c.36,d=6Z("+"),e=1t(c.9.1J).5P("+",d),f={4q:c.9.1s,5m:c.9.1i,8R:c.9.2i,5q:c.9.1H,5l:e,6p:c.9.1F,1D:c.9.1j,5R:c.9.2d,3D:c.9.3D,3U:c.9.W,3T:a,8N:c.9.20,58:c.9.58,4h:c.9.2p,54:k.5r(a),2f:c.9.2f,1V:c.9.2M,aY:c.9.59};"2B"===c.9.1j||"6y"===c.9.1j?(f.4M=c.9.21,f.3Q=c.9.3Q,f.3Y=c.9.3Y,f.b3=c.9.2F,!c.9.1e&&c.9.2H?f.2H=c.9.2H:f.b4=c.9.33):"4v"===c.9.1j&&(f.2f=c.9.2f,f.3L=c.9.3L),c.3S&&(f.3S=c.3S),c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(f,1m,"")),g.2L("/2R").1R(),k.2C(b,f)},k.8V=B(){E a=c.3X,b="";c.G&&H.I("bN 8Q 5O 35:"+a),k.2C(a,b)},c.3W=B(){c.2b="4C";E a=c.2b,b=c.36,d={3U:c.9.W,69:c.9.2j,4q:c.9.1s,4b:k.8F(),3T:a};c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(d,1m,"")),g.2L("/2R").1R(),k.2C(b,d)},k.5x=B(){c.2b="4D";E a=c.2b,b=c.36,d={3U:c.9.W,b8:c.9.20,4q:c.9.1s,4b:k.5w(),3T:a};c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(d,1m,"")),g.2L("/2R").1R(),k.2C(b,d)},k.b5=B(){c.2b="7y";E a=c.2b,b=c.36,d={4q:c.9.1s,8N:c.9.20,4h:c.9.2p,5R:c.9.2d,3U:c.9.W,54:k.5r(a),1D:"b6",6p:c.9.1F,5q:c.9.1H,5l:c.9.1J,5m:c.9.1i,8R:c.9.2i,3D:c.9.3D,3T:a};c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(d,1m,"")),g.2L("/2R").1R(),k.2C(b,d)},k.8X=B(d){E e=d;K(c.G&&H.I("3A 44, 5H ="+e),e){c.9.4c=!1,c.9.4e=!0;E f=c.5k,g=c.9.W+e,h=g+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+h);E j=k.2J(h).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+j);E l={4N:c.9.W,3A:e},m=k.1Y(j,l);c.G&&H.I("(1d 6) 2P 1Y:"+m);E n=c.9.53;c.9.1Z&&(n="5a "+a.2v(18.28.2V(c.9.1N.N(),c.9.W+c.9.1i).N(18.2Z.34)+":"+18.28.2V(c.9.1P.N(),c.9.W+c.9.1i).N(18.2Z.34)));E o={5b:"4H",35:f,5o:{5y:"3F/3C",8o:n,"5z-3y":"3F/x-38-S-5K","5J-3y":"3C","8w-8v":c.9.3E},1L:m};b(o).2q(B(a){K(c.9.4e=!1,a.1L.2s&&(c.G&&H.I("1X 8q 5O 1L 5F 2s:"+a.1L.2s),8r(a.1L.2s)&&(c.9.4c=8r(a.1L.1v.2s),!c.9.4c))){E b={};b.5i="1I 3j 5A",b.1G="1I aL 2N 2S";E d=i.3c({3b:!0,2x:"1B/5d.1C",1y:"5f",3s:"14",3i:{3m:B(){T b}}});d.1v.2q(B(){},B(){c.9.2e=""})}},B(){c.9.4e=!1})}},k.5N=B(a){E b=!1,d=a;K(c.G&&H.I("3A 4x 44, 5H ="+d),d){d.P>5&&(d=a.1b(0,6),c.G&&H.I("3A 4x 44, 5H ="+d)),c.G&&H.I("3A 4x 44, 32 =",c.9.32);E e=j("1V")(c.9.32,d,!0);K(c.G&&H.I("3A 4x 44, 1U =",e),0===e.P){E f={};f.5i="1I 3j 5A",f.1G=c.9.8e;E g=i.3c({3b:!0,2x:"1B/5d.1C",1y:"5f",3s:"14",3i:{3m:B(){T f}}});T g.1v.2q(B(){},B(){c.9.1e&&(c.9.2e="")}),b=!0}}T b},k}]),1w.29("2a").5D("5E",["$25","4t","$3M","$1V",B(a,b,c,d){E e={};T e.6w=B(b){K(b){a.9.2w=b,a.2O&&a.9.2w.P>0&&a.2O(!0);E c="";a.5G()&&(c=d("1V")(a.9.2w,{5g:"2B"},!0),c.P&&(a.G&&H.I("1U 5F aN = "+c),a.9.2w.aO(c.2c,1))),0===a.9.2w.P&&(a.G&&H.I(a.1h.4y),e.1q({1z:a.1h.4y}),a.2O&&a.2O(!1,a.1h.4y)),"3O"!==a.9.1j?(c=d("1V")(a.9.2w,{5g:a.9.1j},!0),c.P?a.9.2T=c[0].5C:(a.9.1j="3O",a.9.2T="(3u 3I a 1D)")):(a.9.1j="3O",a.9.2T="(3u 3I a 1D)"),("3t"===a.9.1O||a.9.2j)&&a.3W()}a.G&&H.I("6w: \\2I: "+1a.1k(a.9.2w,1m,"")),a.3a("7K","7M","bc")},e.6x=B(b){b&&(a.9.22=b,a.9.22.P>0?a.9.1e=!1:a.9.1e=!0),a.G&&H.I("6x: \\2I: "+1a.1k(a.9.22,1m,""))},e.6u=B(b){b&&(a.9.5h=b),a.G&&H.I("6u: \\2I: "+1a.1k(a.9.5h,1m,""))},e.48=B(c){K(a.G&&H.I("48: \\2I: "+c),c&&c.P>0){E d=b.2v(c);a.G&&H.I("3Z: \\40: "+d);E f=a.7i+d;a.27(f),a.3a("2z","6r","bd")}1l{a.G&&H.I("48: \\bB 1v: "+1a.1k(c));1A{E g=1m;1A{g=1a.3V(c)}1u(h){g=c}K(a.G&&H.I("48: \\bA: "+g),g.8t&&g.6v&&g.6v.P>0){E i=g.8t+", "+g.6v;e.1q({1z:i})}}1u(h){e.1q({1z:a.1h.8A})}}},e.6A=B(b){a.3p=b,a.G&&H.I("6A: \\2I: "+1a.1k(a.3p,1m,"")),a.3p&&""!==a.3p&&(a.9.2j=a.3p.bw,a.9.4b=a.3p.4b,a.3W())},e.6C=B(d){a.1c=d,a.1c.6q&&1===a.1c.6q&&(a.1c.1O="3t"),a.9.1O&&(a.1c.1O=a.9.1O,"3t"===a.1c.1O&&a.1c&&a.1c.3H&&"11"===a.1c.3H&&(a.G&&H.I("3t 2s 4z, by bD bE"),a.1c.1O="")),a.G&&H.I("6C: \\2I: "+1a.1k(a.1c,1m,""));E e=b.2v(1a.1k(a.1c,1m,""));a.G&&H.I("3Z: \\40: "+e);E f=a.42+e;a.27(f),("3t"===a.9.1O||1===a.1c.6q)&&a.1c&&a.1c.3H&&"11"!==a.1c.3H&&c.2L("/3q").1R();E g=a.1c.3H;g||(g="77"),a.3a("74","4C",g.N())},e.6B=B(c){a.49=c,a.9.1O&&(a.49.1O=a.9.1O),a.G&&H.I("6B: \\2I: "+1a.1k(a.49,1m,""));E d=b.2v(1a.1k(a.49,1m,""));a.G&&H.I("3Z: \\40: "+d);E e=a.42+d;a.27(e);E f=a.49.3H;f||(f="77"),a.3a("74","4D",f.N())},e.6D=B(c){a.6s=c,a.G&&H.I("6D: \\2I: "+1a.1k(a.6s,1m,""));E d=b.2v(1a.1k(a.6s,1m,""));a.G&&H.I("3Z: \\40: "+d);E e=a.42+d;a.27(e)},e.1q=B(d){E e=d;e.71=a.9.71,c.2L("/2R").1R(),a.G&&H.I("1q: \\2I: "+1a.1k(d,1m,""));E f=b.2v(1a.1k(d,1m,""));a.G&&H.I("3Z: \\40: "+f);E g=a.42+f;a.27(g),a.3a("7K","7M","bv")},e.4G=B(b,c){31(a.G&&H.I("4G: \\7Z: "+b),b){2Q a.4F:e.6w(c);3g;2Q a.4B:e.6x(c);3g;2Q a.4A:e.6u(c);3g;2Q a.bu:e.bj(c);3g;2Q a.36:"6r"===a.2b?e.48(c):"4C"===a.2b?e.6C(c):"4D"===a.2b?e.6B(c):"7y"===a.2b&&e.6D(c);3g;2Q a.3X:e.6A(c);3g;be:a.G&&H.I("bl bm\'t bs a bt")}},e}]),1w.29("2a").1y("8n",B(){}),1w.29("2a").1y("8C",["$2r","$47","$25",B(a,b,c){a.7B=B(a){c.9.1j=a.5g,c.9.2T=a.5C,"4v"===c.9.1j?c.8J():c.9.1O="",b.2G()},a.1W=B(){b.2G()}}]),1w.29("2a").1y("8W",["$25","$2r","$47",B(a,b,c){b.7Y=B(b){a.9.2F=b.2t,c.2G()},b.1W=B(){c.2G()}}]),1w.29("2a").1y("8a",["$2r","88","$25","$47",B(a,b,c,d){a.8j=b.5B(),a.8m=B(a){c.9.2k=a[0],d.2G()},a.1W=B(){d.2G()}}]),1w.29("2a").1y("5f",["$2r","$47","3m",B(a,b,c){a.3m=c,a.1W=B(){b.2G()}}]),1w.29("2a").1y("8c",["$2r","$47","$25",B(a,b,c){a.7r=B(a){c.9.1p=a,b.2G()},a.1W=B(){b.2G()}}]),1w.29("2a").8L(["$bo",B(a){a.2K("1B/5d.1C",\' <6F>{{3m.5i}} <86>{{3m.1G}} <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/7l.1C",\' {{ O.2t }} <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/7I.1C",\' {{ O.65 }} ****** {{ O.64 }} {{ O.bp }} <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/7D.1C",\' {{ O.5C }} <4m y="1D-76" F-5s="{{ O.6L }}"> <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/80.1C",\' {{ O[1] }} <1f y="1W-1f" Z="1f" F-1g="1W()">bn \'),a.2K("1B/2R.1C",\'

br 3j 2s.

3u bg.

\'),a.2K("1B/bf.1C",\'

<8K>1S X-bh

1r 2i 20 1N 1F 2p 2d W 1H 1J 1i 1P 1s 4o 1j <1f F-1g="6T()">7j \'),a.2K("1B/3d.1C",\' bG 4j {{9.20}} {{9.2d}} {{9.1s}} &2g; &2g; &2g; &2g; 7j bI &2g; {{9.2T}} bL 2N <4k-31 F-19="9.1e" y="3r-2B-2N-31" 4J-J="bK" bx-J="8i"><4k-31> 8B 2S &2g; 8p &2g; 8G 6c &2g; aQ &2g; {{9.4i}} 8f 2t &2g; {{9.2F}} {{9.8E}} aR 8x aT (aS = 4l 8x aM) {{9.5M}} 8B# aG 43 &2g; aH &2g; <1f F-1g="89()" y="8g-1f" F-aI="8k()">&2g;aU <4m F-5s="aV/8M.b7" y="8M"> V{{9.3E}} \'),a.2K("1B/3q.1C",\' <4m y="3q-76" F-5s="{{ 73 }}"> aW 1S {{1c.1D}} b2 4j {{1c.69}} <3o Z="6R" 81="4m" 62="{{1c.69}}" 4r="4V.4r"> {{1c.6I}} {{1c.7C}} <3o Z="6R" 81="4m" 62="{{1c.7C}}" 4r="4V.4r"> 9z 4q {{1c.5R}}{{1c.a9}} aa <7P y="D-M-O 1o-D-M-O 6g" F-4f="O 4d 1c.6g"> {{ O }} \')}]);',62,789,'|||||||||sdkData|||||||||||||||||||||||||class|div||function|span|list|var|ng|isInternalDebugging|console|log|label|if|value|group|toString|item|length|right|fa|form|return|pull||mp_merchant_ID||input|type||||text|sm|control||col|CryptoJS|model|JSON|substring|C5ResultData|Step|new_credit_card|button|click|sdkConstants|mp_app_name|mp_channel|stringify|else|null|left|modal|current_token|commErrorHandler|mp_verification_key|mp_amount|String|catch|result|angular|window|controller|Error|try|views|html|channel|show|mp_bill_name|errorDesc|mp_bill_email|Invalid|mp_bill_mobile|void|data|MPdomain|mp_username|mp_request_type|mp_password|mp_credit_card_expiry|replace|MOLPay|mp_editing_enabled|found|filter|close|API|Payload|mp_encrypt_credentials|mp_order_ID|mp_credit_card_cvv|available_token|placeholder|mobile|rootScope|php|callNativeWebview|AES|module|molpayXsdkApp|CurrentMsgType|index|mp_currency|mp_credit_card_no_display|bcard_no|nbsp|not|mp_bill_description|mp_transaction_id|mp_credit_card_country|body|center|search|trim|mp_country|then|scope|status|name|seed|encode|available_channel|templateUrl|circle|Payment|times|credit|HttpPost|billing|lg|mp_credit_card_bank|dismiss|token|nresult|SHA1|put|path|mp_filter|card|testMerchantCredentialsCallback|The|case|finalizingpayment|number|mp_channel_title|opt|decrypt|mod|InternalUsed|requestPath|enc|mp_channel_editing|switch|mp_bin_lock|mp_credit_card_no|Utf8|url|MobileNewApiUrl|hide|www|device_info|GaTrackEvent|animation|open|paymentinfo|isLoading|SHA256|break|container|resolve|payment|updateSdkData|watch|alertdata|MY|barcode|B4ResultData|receipt|new|size|Receipt|Please|PasswordHash|password|MD5|Type|aligned|BIN|gaTrackEvent|json|l_version|sdk_version|application|readonly|status_code|select|encrypt|of|bcard_pin|location|transactionRequest|multi|all|month|document|in_app_mode|msgType|merchant_id|parse|ApiC5|B4ResultUrl|year|htmlStringBase64|nhtmlStringBase64|sha1|nativeWebTransactionResults||Check|indexOf|variables|uibModalInstance|B3Handler|D7ResultData|checksum|chksum|bin_checked|in|bin_checking_in_progress|repeat|molpay|country|mp_credit_card_country_title|ID|toggle|100|img|tel|mp_debug_mode|footer|amount|options|exp|base64|please|pointbcard|chevron|Lock|NoChannelFoundCheckCurrencyValue|failed|GetBankListUrl|T1Url|C5|D7|controllerAs|GetAvailableChannelByIdUrl|OnApiResponseReceived|POST|xxxx|on|Billing|billinginfo|cvv|merchantID|mp_ga_enabled|generate|localStorage|module_id|setTimeout|check|addCustomCSS|vm|inAppCallback|isDeploy|cdomain|AccessDeniedMidAppnameVerificationkey|expdate|when|mp_preferred_token|authData|vcode|searchString|wrapper_version|CommunicationError|token_status|mp_is_escrow|Basic|method|marginless|alertmodal|listgroup|AlertModalCtrl|maskname|available_banklist|errorTitle|CLOSE|IsDebitCardUrl|bill_mobile|app_name|row|headers|testMerchantCredentials|bill_email|VcodeHash|src|SecuredEncryptionFailed|icon|Android|ChecksumForD7|ApiD7|Accept|Content|information|getCountries|title|factory|ApiHandlerService|and|isBelowAndroid44|binValue|bcard|Data|urlencoded|closemolpay|bcard_point|BinLockCheck|with|replaceAll|ApiT1|cur|uuid4|deviceDetector|molpayResultString|device|header|mp_ga_userid|AuthenticationService|getChannelLogoFromChannelName||nativeWebCloseAllWindows|string|PaymentInfoCtrl|bin4|bin|nativeWebRunScriptOnPopup|xdk|https|txn_ID|request|bar|date|AmountNotFound|ApiGetAvailableChannelById|PaymentRecordsLogUrl|notes|Malaysia|domain_mode|com|isStarting|css|mp_custom_css_url|app|webview_url_prefix|bill_name|pInstruction|B3|E9ResultData|email|GetBankListHandler|error_message|GetAvailableChannelByIdHandler|T1Handler|credit3|split|B4Handler|D7Handler|C5Handler|E9Handler|coreVersion|h4|block|statusText|pcode_lbl|checkIfThisIsAValidCountryCode|InvalidCountryCode|logo_url|VerificationKeyNotFound|Search|response|beam|ga|code128c|CountryNotFound|onPayClicked|mp_is_secure|getElementById|element|display|onChannelListClicked|encodeURIComponent|ApiB3|mp_transaction_request_type|ApiGetBankList|toplogourl|PaymentStatus|onBillingInfoChanged|logo|unknown|getChannelMasknameFromChannelName|PreloadData|currency|PasswordNotFound|MerchantIdNotFound|AppNameNotFound|OrderIdNotFound|MPSecondaryDomain|UsernameNotFound|toFixed|nativeWebOpenMOLPayWindow|Pay|CurrencyNotFound|banklistmodal|resultform|ReceiptCtrl|Run|BCard|hlbFailedString|onCardSelected|uibModal|timeout|http|hlbSuccessString|script|popup|E9|extend|callback|onChannelSelected|pcode|channelmodal|luhn|closeAll|_|iphone|cardlistmodal|maybankSuccessString|Main|bank|PaymentInfo|MOLPayPayment|aid|li|timeoutHttpIntercept|recordsLog|GetAvailableChannelById|GetBankList|IsDebitCard|mobile_new|gaClientId|mpUserId|onBankSelected|nurl|countrylistmodal|render|chips|uid|TransactionIdForReceiptRequestNotFound|generated|h5|RegExp|Countries|proceedClicked|CountrylistModalCtrl|pin|CardlistModalCtrl|xxx|mp_bin_lock_err_msg|Bank|proceed|issuer_bank|No|countryArray|proceedDisabled|parseInt|onCountrySelected|FinalizingPaymentCtrl|Authorization|CVV|responded|Boolean|larger|error_code|point|Version|SDK|BCARD|onCardNumberClicked|or|UnhandledErrorContactSupport|Card|ChannelModalCtrl|bank_country|credit_disclaimer|ChecksumForC5|Exp|focus|MPMainDomain|updateBCardPoints|h2|run|poweredByMOLPay|orderid|onCountrylistClicked|MM|B4|bill_desc|disclaimer|createTextRange|onBanklistClicked|ApiB4|BanklistModalCtrl|IsDebitCardCheck|verification|returned|B2C_paymentProcessed|change|Communication|internet|nativeWebRequestUrlUpdatesOnFinishLoad|connection|key|B2C_paymentFailed|link|Maybank2U|unescape|assign|success|mprunscriptonpopup|parameters|maha|nativeWebRequestUrlUpdates|interceptors|denied|submit|routeProvider|redirectTo|config|otherwise|Access|use|merchant|username|m2uTicketsPaymentConfirmed|id|1e4|mptransactionresults|httpProvider|do|HLB|Payable|_self|target|Online|creditCardInput|nativeWebClosePopupAndRunScriptOnMOLPayWindow|mpopenmolpaywindow|setCaretPosition|countries|mpopenpopup|move|typeof|ngRoute|leodido|ngSanitize|gi|userAgent|raw|directive|isString|nativeWebOpenPopup|injector|setSelectionRange|add|fileUrl|strict|my|selectionStart|pay|isNumber|parseFloat|exec|character|apply|ngTouch|error|payable_amt|Note||onlinepayment|support|contact|mpclosepopupandrunscriptonmolpaywindow|Status|Unhandled|enableInAppMode|restrict|push|getDeviceInfo|Secured||mpcloseallwindows|MYR|this|mp_url_scheme|mp_authData|ui|prototype||transactionRequestWithOrderId|cssInjector|encryption|FastClick|attach|bootstrap|for|Http|digit|Last|6298|Pin|disabled|spin|spinner|debit|Points|removed|splice|YYYY|Country|Use|RM1|points|PROCEED|images|Services|T1|is_escrow|message|ApiRecordsLog|checksumString|Transaction|bank_name|cardnumber|ApiE9|MOLWallet|png|order_ID|transactionRequestWithTransactionId|version|mp|Initiate|Success|default|main|wait|Platform|horizontal|GenBarcodeHandler|checkbox|Response|doesn|Close|templateCache|debit_credit|vertical|Finalizing|have|handler|ApiGenBarcode|CommError|tranID|off|just|YY|nerrorResult|nJSON|cvc|send|results|description|Order|offset|through|creditcard|Yes|New|Result|Get|2Fpaymentinfo|dt|dp|textAlign|none|event|monospace|font|quite|height|el|ea|displayValue|ec|cid|fontSize|eLabel|tid|eAction|eCategory|000|lineColor|UA|backgroundColor|setItem||available|reuse|existing|29894240|getItem|analytics|google|1002|1003|nwebview_url_prefix|1001|code|Params|OK|Returned|HttpGet|convertSafeBase64StringBackToOriginalVersion|mID|appName|md5|Sent|Not|GET|Request|sent|Checksum|Proceed|MainCtrl|LUHN|collect|width'.split('|'),0,{})) diff --git a/MOLPayXDKExample/platforms/android/platform_www/plugins/molpay-mobile-xdk-cordova/molpay.js b/MOLPayXDKExample/platforms/android/platform_www/plugins/molpay-mobile-xdk-cordova/molpay.js index c7a2cff..8592df9 100644 --- a/MOLPayXDKExample/platforms/android/platform_www/plugins/molpay-mobile-xdk-cordova/molpay.js +++ b/MOLPayXDKExample/platforms/android/platform_www/plugins/molpay-mobile-xdk-cordova/molpay.js @@ -1,3 +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://",molpayresulturl="https://www.onlinepayment.com.my/MOLPay/result.php",molpaynbepayurl="https://www.onlinepayment.com.my/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){isInternalDebugging&&console.log("postMolpayResultHandler innHtml = "+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),isInternalDebugging&&console.log("innHtmlString = "+b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(isInternalDebugging&&console.log("onMolpayUiFrameLoad B4 results = "+b),g=JSON.parse(b))){var h=g.tranID;h&&(isInternalDebugging&&console.log("mainUiFrame.contentWindow.transactionRequestWithTransactionId = "+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){isInternalDebugging&&console.log("onBankUiLoadstop event.url ="+a.url);var b;b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpaynbepayurl found"),bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){isInternalDebugging&&console.log("bankUiWindow window.open to window.location inject ok")}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){isInternalDebugging&&console.log("bankUiWindow window.close to window.location.assign inject ok")}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){isInternalDebugging&&console.log("onBankUiLoadstart event.url = "+a.url);var b;if(b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstart molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b),postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)){isInternalDebugging&&console.log("onBankUiLoadstart molpaynbepayurl found");var c=10,f=0,g=setInterval(function(){h()},1e3),h=function(){f++,f>c?clearInterval(g):bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b);var c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(g))})}}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){var b,c;if(a&&a.indexOf(mpopenmolpaywindow)>-1)c=new RegExp(mpopenmolpaywindow,"g"),b=a.replace(c,""),b&&b.length>0&&(isInternalDebugging&&console.log("inAppCallback base64HtmlString = ",b),createBankUiWindow(b));else if(a&&a.indexOf(mptransactionresults)>-1&&(c=new RegExp(mptransactionresults,"g"),b=a.replace(c,""),b&&b.length>0)){var d=window.atob(b),e=JSON.stringify(JSON.parse(d));transactionResultCallback(e),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(c=new RegExp(mprunscriptonpopup,"g"),b=a.replace(c,""),b&&b.length>0)){var f=window.atob(b);isInternalDebugging&&console.log("run script on popup, script ="+f),bankUiWindow.executeScript({code:f},function(a){isInternalDebugging&&console.log("run script on popup ok")})}},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isInternalDebugging&&console.log("MOLPay startmolpay paymentdetails = "+JSON.stringify(a,null,"")),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(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){isInternalDebugging&&console.log("MOLPay transactionRequest paymentdetails = "+JSON.stringify(a,null,""));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(){isClosingMolpay=!0,mainUiFrame.contentWindow.transactionRequest()};var molpay=new MOLPay;module.exports=molpay; +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://",molpayresulturl="https://www.onlinepayment.com.my/MOLPay/result.php",molpaynbepayurl="https://www.onlinepayment.com.my/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){isInternalDebugging&&console.log("postMolpayResultHandler innHtml = "+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),isInternalDebugging&&console.log("innHtmlString = "+b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(isInternalDebugging&&console.log("onMolpayUiFrameLoad B4 results = "+b),g=JSON.parse(b))){var h=g.tranID;h&&(isInternalDebugging&&console.log("mainUiFrame.contentWindow.transactionRequestWithTransactionId = "+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){isInternalDebugging&&console.log("onBankUiLoadstop event.url ="+a.url),mainUiFrame.contentWindow.nativeWebRequestUrlUpdatesOnFinishLoad({requestPath:a.url});var b;b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpaynbepayurl found"),bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){isInternalDebugging&&console.log("bankUiWindow window.open to window.location inject ok")}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){isInternalDebugging&&console.log("bankUiWindow window.close to window.location.assign inject ok")}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){isInternalDebugging&&console.log("onBankUiLoadstart event.url = "+a.url);var b;if(b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstart molpayresulturl found"),mainUiFrame.contentWindow.nativeWebRequestUrlUpdates({requestPath:a.url})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)){isInternalDebugging&&console.log("onBankUiLoadstart molpaynbepayurl found");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];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b);var c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(f))})}}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){var b,c;if(a&&a.indexOf(mpopenmolpaywindow)>-1)c=new RegExp(mpopenmolpaywindow,"g"),b=a.replace(c,""),b&&b.length>0&&(isInternalDebugging&&console.log("inAppCallback base64HtmlString = ",b),createBankUiWindow(b));else if(a&&a.indexOf(mpcloseallwindows)>-1)isInternalDebugging&&console.log("inAppCallback closing bankUiWindow"),bankUiWindow.close();else if(a&&a.indexOf(mptransactionresults)>-1&&(c=new RegExp(mptransactionresults,"g"),b=a.replace(c,""),b&&b.length>0)){var d=window.atob(b),e=JSON.stringify(JSON.parse(d));transactionResultCallback(e),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(c=new RegExp(mprunscriptonpopup,"g"),b=a.replace(c,""),b&&b.length>0)){var f=window.atob(b);isInternalDebugging&&console.log("run script on popup, script ="+f),bankUiWindow.executeScript({code:f},function(a){isInternalDebugging&&console.log("run script on popup ok")})}},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isInternalDebugging&&console.log("MOLPay startmolpay paymentdetails = "+JSON.stringify(a,null,"")),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){isInternalDebugging&&console.log("MOLPay transactionRequest paymentdetails = "+JSON.stringify(a,null,""));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(){isClosingMolpay=!0,mainUiFrame.contentWindow.transactionRequest()};var molpay=new MOLPay;module.exports=molpay; }); diff --git a/MOLPayXDKExample/platforms/ios/MOLPayExample.xcodeproj/project.pbxproj b/MOLPayXDKExample/platforms/ios/MOLPayExample.xcodeproj/project.pbxproj index c63ee9f..6009d31 100644 --- a/MOLPayXDKExample/platforms/ios/MOLPayExample.xcodeproj/project.pbxproj +++ b/MOLPayXDKExample/platforms/ios/MOLPayExample.xcodeproj/project.pbxproj @@ -15,9 +15,9 @@ 3047A5121AB8059700498E2A /* build-debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3047A50F1AB8059700498E2A /* build-debug.xcconfig */; }; 3047A5131AB8059700498E2A /* build-release.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3047A5101AB8059700498E2A /* build-release.xcconfig */; }; 3047A5141AB8059700498E2A /* build.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3047A5111AB8059700498E2A /* build.xcconfig */; }; - C1FE8A7BA6154964B2AA8E2A /* CDVInAppBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = AD3CC60CD3D44E0A98081A82 /* CDVInAppBrowser.m */; }; - 88A60B88BB4E426F98796333 /* PrivacyScreenPlugin.h in Resources */ = {isa = PBXBuildFile; fileRef = EDF87EE6AB3248A0B8A5078F /* PrivacyScreenPlugin.h */; }; - 1704079E99B94E74AE942B59 /* PrivacyScreenPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 052CC850596142B39C81D4D0 /* PrivacyScreenPlugin.m */; }; + CCEDA075438A416B9A3480A7 /* CDVInAppBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A817DC389F3432DAC865686 /* CDVInAppBrowser.m */; }; + 7F0DE29BAA5B41F28D0585F5 /* PrivacyScreenPlugin.h in Resources */ = {isa = PBXBuildFile; fileRef = 67EDE2F5DE384F4ABC39B18C /* PrivacyScreenPlugin.h */; }; + 0191393D47DE48B396E52344 /* PrivacyScreenPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 957E22C537774F9CB6870AAE /* PrivacyScreenPlugin.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -57,10 +57,10 @@ 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 = ""; }; - AD3CC60CD3D44E0A98081A82 /* CDVInAppBrowser.m */ = {isa = PBXFileReference; name = "CDVInAppBrowser.m"; path = "cordova-plugin-inappbrowser/CDVInAppBrowser.m"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; - 00AA9ECA97994B5FA85ED99C /* CDVInAppBrowser.h */ = {isa = PBXFileReference; name = "CDVInAppBrowser.h"; path = "cordova-plugin-inappbrowser/CDVInAppBrowser.h"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; - EDF87EE6AB3248A0B8A5078F /* PrivacyScreenPlugin.h */ = {isa = PBXFileReference; name = "PrivacyScreenPlugin.h"; path = "cordova-plugin-privacyscreen/PrivacyScreenPlugin.h"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; - 052CC850596142B39C81D4D0 /* PrivacyScreenPlugin.m */ = {isa = PBXFileReference; name = "PrivacyScreenPlugin.m"; path = "cordova-plugin-privacyscreen/PrivacyScreenPlugin.m"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; + 0A817DC389F3432DAC865686 /* CDVInAppBrowser.m */ = {isa = PBXFileReference; name = "CDVInAppBrowser.m"; path = "cordova-plugin-inappbrowser/CDVInAppBrowser.m"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; + FB86C1E5721C4704B3C2BAF1 /* CDVInAppBrowser.h */ = {isa = PBXFileReference; name = "CDVInAppBrowser.h"; path = "cordova-plugin-inappbrowser/CDVInAppBrowser.h"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; + 67EDE2F5DE384F4ABC39B18C /* PrivacyScreenPlugin.h */ = {isa = PBXFileReference; name = "PrivacyScreenPlugin.h"; path = "cordova-plugin-privacyscreen/PrivacyScreenPlugin.h"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; + 957E22C537774F9CB6870AAE /* PrivacyScreenPlugin.m */ = {isa = PBXFileReference; name = "PrivacyScreenPlugin.m"; path = "cordova-plugin-privacyscreen/PrivacyScreenPlugin.m"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -163,10 +163,10 @@ 307C750510C5A3420062BCA9 /* Plugins */ = { isa = PBXGroup; children = ( - AD3CC60CD3D44E0A98081A82 /* CDVInAppBrowser.m */, - 00AA9ECA97994B5FA85ED99C /* CDVInAppBrowser.h */, - EDF87EE6AB3248A0B8A5078F /* PrivacyScreenPlugin.h */, - 052CC850596142B39C81D4D0 /* PrivacyScreenPlugin.m */, + 0A817DC389F3432DAC865686 /* CDVInAppBrowser.m */, + FB86C1E5721C4704B3C2BAF1 /* CDVInAppBrowser.h */, + 67EDE2F5DE384F4ABC39B18C /* PrivacyScreenPlugin.h */, + 957E22C537774F9CB6870AAE /* PrivacyScreenPlugin.m */, ); name = Plugins; path = "MOLPayExample/Plugins"; @@ -281,9 +281,9 @@ 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */, - C1FE8A7BA6154964B2AA8E2A /* CDVInAppBrowser.m in Sources */, - 88A60B88BB4E426F98796333 /* PrivacyScreenPlugin.h in Resources */, - 1704079E99B94E74AE942B59 /* PrivacyScreenPlugin.m in Sources */, + CCEDA075438A416B9A3480A7 /* CDVInAppBrowser.m in Sources */, + 7F0DE29BAA5B41F28D0585F5 /* PrivacyScreenPlugin.h in Resources */, + 0191393D47DE48B396E52344 /* PrivacyScreenPlugin.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 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 c013960..e2abc45 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 @@ -

Loading.

Please wait.

Loading...
\ No newline at end of file +

Loading.

Please wait.

Loading...
\ No newline at end of file diff --git a/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/scripts.f29f8607.js b/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/scripts.f29f8607.js new file mode 100644 index 0000000..d29f2bb --- /dev/null +++ b/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/scripts.f29f8607.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}('"9p 9Y";1w.29("2a",["9L","9N","a7","ab-4t","F.5T","at.aB","9D","9f.9H","4k-31","3o","5S","1w.6l.9U","9M.7E"]).9R("4L",["$25",B(a){T{aj:"A",98:B(b,c,d){c.4J("91",B(){a.75()})}}}]).5D("7Q",B(){T{6a:B(a){T a.7t=9u,a}}}).9m(["$9k","$9w",B(a,b){a.51("/",{2x:"1B/3d.1C",1y:"63",4E:"3d"}).51("/3d",{2x:"1B/3d.1C",1y:"63",4E:"3d"}).51("/3q",{2x:"1B/3q.1C",1y:"7n",4E:"3q"}).51("/2R",{2x:"1B/2R.1C",1y:"8n",4E:"2R"}).9n({9l:"/"}),b.9h.ak("7Q")}]).8L(["$25","$3M","$7u","4t","5Y","5T","88","$1V","5E","ax","5S",B(a,b,c,d,e,f,g,h,i,j,k){az.aA(3R.2l),1t.au.5P=B(a,b,c){T aq.1R(3r 87(a.1R(/([\\/\\,\\!\\\\\\^\\$\\{\\}\\[\\]\\(\\)\\.\\*\\+\\?\\|\\<\\>\\-\\&])/g,"\\\\$&"),c?"9O":"g"),"62"==9K b?b.1R(/\\$/g,"$$$$"):b)},a.55=B(a,b){E c=3r 87(a,"g"),d=c.a4(b);T d},a.4X=!0,a.G=!1,a.6E="2.2.",a.4X||(a.G=!0),a.8I="68://38.ac.6j.9Z/",a.7f="68://a1.4g.6j/",a.1M=a.8I,a.6f=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7R",a.4F=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7S",a.4A=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7T",a.5k=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7U",a.36=a.1M+"1S/1X/7V/2c.26",a.4B=a.1M+"1S/1X/82/2c.26",a.3X="",a.2b="",a.3p="",a.9T="9I://",a.7i="9F://",a.61="ao://",a.9E="af://",a.66="9d://",a.42="9v://",a.5U=a.1M+"1S/1v.26",a.7J="9s.9x",a.7v="90",a.7q="97",a.3e=!1,a.6k=!0,a.3S=!1,a.1h={57:"92 1z, 4u 4T 93 95, 9r, 8z 3w",4Z:"9o 9i, 4u 4T 9q 9t, 6n 2t, 8z 8Y 96",4y:"8i 1D 1U, 4u 4T 7a L",7g:"1N L 2h 1U",7b:"1P L 2h 1U",7c:"W L 2h 1U",7d:"1i L 2h 1U",7e:"20 L 2h 1U",6d:"1s L 2h 1U",7k:"2d L 2h 1U",6S:"2p L 2h 1U",6K:"1I 2p L",6M:"1r L 2h 1U",84:"2j L aC 3q 6a 2h 1U",8A:"ah a8, 4u ae ad",5t:"am ay 4z"},a.9={1N:"",1P:"",W:"",1i:"",20:"",1s:"",2d:"ap",2p:"3n",1r:"",1Z:!0,6U:!1,1j:"",30:!0,1T:"",1F:"",1H:"",1J:"",2i:"",59:"0",4o:!1,ar:"",2j:"",1O:"",4b:"",3D:"2",as:"",3E:"",39:"",56:"",4R:"4g-24-67-38",33:"",21:"",1Q:"",2F:"",3Q:"",3Y:"",2H:"",1e:!0,2k:"3n",4i:"6h",2e:"",2f:"",3L:"",5M:"",58:"1",2w:"",22:"",1p:"",5h:"",2T:"",4O:!1,5X:"",2M:"0",4c:!1,4e:!1,6m:"",4Y:"",6i:"",8E:"",6o:"",32:"",8e:"",52:""},!a.4X,a.$3l("9.2k",B(){E b=g.5B(),c=h("1V")(b,a.9.2k,!0);c.P?a.9.4i=c[0][1]:a.9.2k=""}),a.$3l("9.1Q",B(){K(a.9.1Q){E b=1t(a.9.1Q);b=b.1R(/\\//g,"");E c="";b.P>4&&(b=b.1b(0,4)),1===b.P&&(c=8l(b.1b(0,1)),c>1&&(b="")),2===b.P&&(c=8l(b.1b(0,2)),c>12&&(b=b.1b(0,1))),b.P>2&&(b=b.1b(0,2)+"/"+b.1b(2,b.P)),a.9.1Q=b,5===a.9.1Q.P&&(a.9.3Q=a.9.1Q.1b(0,2),a.9.3Y=a.9.1Q.1b(3,5))}}),a.$3l("9.2f",B(){K(a.9.2f){E b=1t(a.9.2f);b.P>10&&(b=b.1b(0,10)),a.9.2f=b}}),a.$3l("9.1e",B(){K(a.9.1e)a.9.33="",a.9.2e="",a.9.21="",a.9.1Q="",a.9.2F="",a.9.2k="3n",a.9.4i="6h",a.9.3Q="",a.9.3Y="",a.9.2H="";1l K(a.9.22){K(a.9.22.P>0&&!a.9.1p)K(a.9.52){E b=h("1V")(a.9.22,a.9.52,!0);K(b.P){a.G&&H.I("52 1U : ",b[0]);E c=a.9.22.45(b[0]);a.9.1p=a.9.22[c]}1l a.9.1p=a.9.22[0]}1l a.9.1p=a.9.22[0];a.9.2e=a.9.1p.65+"******"+a.9.1p.64,a.9.21="",a.9.1Q=a.9.1p.50.1b(2,4)+"/"+a.9.1p.50.1b(0,2),a.9.2F=a.9.1p.8h,a.9.2k=a.9.1p.8D,a.9.2H=a.9.1p.2H}}),a.$3l("9.1p",B(){!a.9.1e&&a.9.1p&&(a.9.2e=a.9.1p.65+"******"+a.9.1p.64,a.9.21="",a.9.1Q=a.9.1p.50.1b(2,4)+"/"+a.9.1p.50.1b(0,2),a.9.2F=a.9.1p.8h,a.9.2k=a.9.1p.8D,a.9.2H=a.9.1p.2H)}),a.9G=B(a,b){K(1m!==a)K(a.8T){E c=a.8T();c.9J("a5",b),c.3I()}1l a.a0?(a.8H(),a.9V(b,b)):a.8H()},a.5G=B(){T a.55("5v 4.1",a.9.39)||a.55("5v 4.2",a.9.39)||a.55("5v 4.3",a.9.39)?!0:!1},a.$3l("9.2e",B(){K(a.9.2e){E b=1t(a.9.2e);K(b=b.1R(/ /g,""),6===b.P&&a.9.2M&&"1"===a.9.2M&&e.8X(b),6===b.P&&a.9.32&&a.9.32.P>0){E c=e.5N(b);c&&(a.9.2e="")}b.P>16&&(b=b.1b(0,16)),a.5G()||(b.P>4&&b.P<=8?b=b.1b(0,4)+" "+b.1b(4,b.P):b.P>8&&b.P<=12?b=b.1b(0,4)+" "+b.1b(4,8)+" "+b.1b(8,b.P):b.P>12&&b.P<16&&(b=b.1b(0,4)+" "+b.1b(4,8)+" "+b.1b(8,12)+" "+b.1b(12,b.P))),16===b.P&&(a.9.33=b,b=b.1b(0,4)+" "+b.1b(4,8)+" "+b.1b(8,12)+" "+b.1b(12,16)),b&&(a.9.2e=b)}}),a.$3l("9.21",B(){K(a.9.21){E b=1t(a.9.21);b.P>4&&(b=b.1b(0,4)),a.9.21=b}}),a.75=B(){!a.9.22&&a.9.1F&&a.9.1H&&a.9.1J&&e.5Q()},a.4U=B(b){a.G&&H.I("9X: "+b),j.9W(b)},a.6J=B(a){E b=!1,c=g.5B(),d=h("1V")(c,a,!0);T d.P&&(b=!0),b},a.78=B(b){a.G&&H.I("78: "+b);E c="",d=h("1V")(a.9.2w,{2t:b},!0);T d.P&&(c=d[0].5g),c},a.8J=B(){E b=a.9.1s,c=a3(b);c=4l*c,a.9.5M=c.7h(0)},a.3k=B(){K(!a.9.1s)T 1K i.1q({1z:a.1h.6d});K(1w.a2(a.9.1s))a.9.1s=a.9.1s.7h(2);1l K(1w.9S(a.9.1s)){E b=h("2S")(a.9.1s,2);K(a.9.1s=b,!a.9.1s)T 1K i.1q({1z:a.1h.6d})}K(!a.9.1N)T 1K i.1q({1z:a.1h.7g});1A{a.9.1N=1t(a.9.1N.2o())}1u(c){a.G&&H.I(c)}K(!a.9.1P)T 1K i.1q({1z:a.1h.7b});1A{a.9.1P=1t(a.9.1P.2o())}1u(c){a.G&&H.I(c)}K(!a.9.W)T 1K i.1q({1z:a.1h.7c});1A{a.9.W=1t(a.9.W.2o())}1u(c){a.G&&H.I(c)}K(!a.9.1i)T 1K i.1q({1z:a.1h.7d});1A{a.9.1i=1t(a.9.1i.2o())}1u(c){a.G&&H.I(c)}K(!a.9.20)T 1K i.1q({1z:a.1h.7e});1A{a.9.20=1t(a.9.20.2o())}1u(c){a.G&&H.I(c)}K(!a.9.2d)T 1K i.1q({1z:a.1h.7k});1A{a.9.2d=1t(a.9.2d.2o())}1u(c){a.G&&H.I(c)}K(!a.9.2p)T 1K i.1q({1z:a.1h.6S});1A{a.9.2p=1t(a.9.2p.2o())}1u(c){a.G&&H.I(c)}K(!a.6J(a.9.2p))T 1K i.1q({1z:a.1h.6K});K(!a.9.1r)T 1K i.1q({1z:a.1h.6M});1A{a.9.1r=1t(a.9.1r.2o())}1u(c){a.G&&H.I(c)}K((1K 0===a.9.1Z||1m===a.9.1Z)&&(a.9.1Z=!0),a.9.1N&&a.9.1P&&a.9.1r&&a.9.W&&a.9.1i&&a.9.1Z)1A{K(!a.2u){a.2u=k.4P().N();E g=18.3f(a.9.W+a.9.1i+a.2u).N();a.9.1N=18.28.3J(a.9.1N,g).N(),a.9.1P=18.28.3J(a.9.1P,g).N(),a.9.1r=18.28.3J(a.9.1r,g).N()}}1u(c){i.1q({1z:a.1h.5t})}1l a.9.53="5a "+d.2v(a.9.1N+":"+a.9.1P);K(1K 0===a.9.56&&(a.9.56="x"),a.9.3E=a.6E+a.9.56,a.9.39=f.9Q.9P,a.9.3D="2",a.9.58="1",1K 0===a.9.59&&(a.9.59="0"),a.9.6U=!1,a.9.2M||(a.9.2M="0"),1K 0===a.9.4O&&(a.9.4O=!0),a.9.4R||(a.9.4R="4g-24-67-38"),a.9.30||(a.9.30=!1),a.9.1j?"3O"===a.9.1j&&(a.9.30=!0,a.9.2T="(3u 3I a 1D)"):(a.9.1j="3O",a.9.30=!0,a.9.2T="(3u 3I a 1D)"),a.9.1T||(a.9.1T=!1),a.9.1F&&a.9.1H&&a.9.1J&&a.9.2i&&a.9.1F||(a.9.1T=!0),a.9.1H)1A{a.9.1H=1t(a.9.1H.2o())}1u(c){a.G&&H.I(c)}K(a.9.1J)1A{a.9.1J=1t(a.9.1J.2o())}1u(c){a.G&&H.I(c)}K(a.9.2i)1A{a.9.2i=1t(a.9.2i.2o())}1u(c){a.G&&H.I(c)}K(a.9.1F)1A{a.9.1F=1t(a.9.1F.2o())}1u(c){a.G&&H.I(c)}T a.9.4o||(a.9.4o=!1),a.9.2k="3n",a.9.4i="6h",a.9.1e=!0,"3t"!==a.9.1O||a.9.2j?(a.9.6m?(4S(B(){a.$a6(a.4U(a.9.6m))},0),4S(B(){1w.6W(3R.6V("6n-2l")).6l({6X:"6G"}),a.6k=!1},4l)):(1w.6W(3R.6V("6n-2l")).6l({6X:"6G"}),a.6k=!1),(a.9.6i||a.9.4Y)&&("1"===a.9.6i?a.1M=a.7f:a.9.4Y&&(a.1M=a.9.4Y),a.6f=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7R",a.4F=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7S",a.4A=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7T",a.5k=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7U",a.36=a.1M+"1S/1X/7V/2c.26",a.4B=a.1M+"1S/1X/82/2c.26",a.5U=a.1M+"1S/1v.26"),1K(a.9.1O&&"ag"===a.9.1O?a.3N():e.79())):1K i.1q({1z:a.1h.84})},a.al=B(){T a.9.39},a.5Z=B(b){a.G&&H.I("5Z: "+b);E c="",d=h("1V")(a.9.2w,{2t:b},!0);T d.P&&(c=d[0].6L),c},1x.ai=B(){a.3S=!0},1x.3k=B(b,c){a.9={},c&&(a.4W=c),a.G&&H.I("1x.3k, 7A = "+c);1A{a.9=1a.3V(b)}1u(d){a.9=1w.7z(a.9,b)}a.G&&H.I("1x.3k: $25.9 = "+1a.1k(a.9)),a.3k()},1x.9g=B(b){E c=b.2Y;1A{c=1a.3V(b).2Y}1u(d){c=b.2Y}a.G&&H.I("1L.2Y: "+c);E f="";c.45(a.5U)>-1&&(a.G&&H.I("8Q 1v 8Z"),a.3X=c,e.8V(),f=a.61,a.27(f))},1x.94=B(b){E c=b.2Y;1A{c=1a.3V(b).2Y}1u(e){c=b.2Y}a.G&&H.I("1L.2Y: "+c);E f="",g="",h="",i="";c.45(a.7J)>-1?(a.G&&H.I("99 3j 9c 2L: "+c),g="1x.3M.9b(9a(9e))",h="4S(B(){"+g+"; }, 4l);",i=d.2v(h),f=a.66+i,a.G&&H.I("7o 7w 4J 7x, 35 = "+f),a.27(f)):(c.45(a.7v)>-1||c.45(a.7q)>-1)&&(a.G&&H.I("9y 9C 3j 1v 2L: "+c),g=\'3R.7m.9B="9A"; 3R.7m.9j();\',h="4S(B(){"+g+"; }, 4l);",i=d.2v(h),f=a.66+i,a.G&&H.I("7o 7w 4J 7x, 35 = "+f),a.27(f))},a.7F=B(){E b=a.61;a.27(b)},a.5L=B(){e.5x(),a.7F()},1x.5L=B(){a.5L()},a.3N=B(){"3t"===a.9.1O&&a.9.2j&&""!==a.9.2j?a.3W():a.9.2j&&""!==a.9.2j?a.3W():e.5x()},1x.3N=B(){a.3N()},1x.aw=B(b){b&&(a.9.20=b),a.3N()},1x.b9=B(b){b&&(a.9.2j=b),a.3N()},1x.cu=B(a){E b=1t(a),c=f.5V;T a&&"7H"===c&&(b=b.1R(/\\-/g,"+"),b=b.1R(/\\7G/g,"=")),b},1x.4U=B(b){a.4U(b)},1x.5p=B(b,c){a.9={},a.G&&H.I("1x.5p, 7A = "+c),c&&(a.2O=c);1A{a.9=1a.3V(b)}1u(f){a.9=1w.7z(a.9,b)}K(a.G&&H.I("1x.5p: $25.9 = "+1a.1k(a.9)),(1K 0===a.9.1Z||1m===a.9.1Z)&&(a.9.1Z=!0),a.9.1N&&a.9.1P&&a.9.1r&&a.9.W&&a.9.1i&&a.9.1Z)1A{K(!a.2u){a.2u=k.4P().N();E g=18.3f(a.9.W+a.9.1i+a.2u).N();a.9.1N=18.28.3J(a.9.1N,g).N(),a.9.1P=18.28.3J(a.9.1P,g).N(),a.9.1r=18.28.3J(a.9.1r,g).N()}}1u(f){i.1q({1z:a.1h.5t})}1l a.9.53="5a "+d.2v(a.9.1N+":"+a.9.1P);e.6e()},a.27=B(b){E c=b,d=f.5V;a.G&&H.I("27 5V Z:"+1a.1k(d,1m,"")),a.G&&H.I("27: \\7Z: "+c),a.4W?(a.4W(b),a.G&&H.I("$25.27, $25.4W 35 = "+b)):("7H"===d&&(c=b.1R(/\\+/g,"-"),c=c.1R(/\\=/g,"7G")),a.9.6o&&(c=a.9.6o+c,a.G&&H.I("27: \\cn: "+c)),1x.3M=c)},a.6T=B(){a.3k(),b.2L("/3d").1R()},a.4X||a.3k()}]),1w.29("2a").1y("cF",B(){}),1w.29("2a").1y("63",["$2r","$25","$3M","$7s","5Y","7E",B(a,b,c,d,e,f){a.8k=B(){E a=!1;T b.9.2M&&b.9.1e&&"1"===1t(b.9.2M)&&(b.9.4c||(a=!0)),a},a.8y=B(){K(!b.9.1e){E c=d.3c({3b:!0,2x:"1B/7I.1C",1y:"8c",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.6Y=B(){K(b.9.30){E c=d.3c({3b:!0,2x:"1B/7D.1C",1y:"8C",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.8O=B(){K(b.9.1e){E c=d.3c({3b:!0,2x:"1B/80.1C",1y:"8a",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.8U=B(){K(b.9.1e){E c=d.3c({3b:!0,2x:"1B/7l.1C",1y:"8W",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.89=B(){E a=!1,c={};K(c.5i="1I 3j 5A",c.1G="",b.9.1F)K(0===b.9.1F.P)a=!0,c.1G="1I 2D 2t";1l K(b.9.1H)K(0===b.9.1H.P)a=!0,c.1G="1I 2D 6t";1l K(b.9.1J)K(0===b.9.1J.P)a=!0,c.1G="1I 2D 24";1l K("3O"===b.9.1j)a=!0,c.1G="3u 3I a 3j 1D";1l K("2B"===b.9.1j||"6y"===b.9.1j)K(!b.9.33||b.9.33.P<16)a=!0,c.1G="1I 2B 2N 2S";1l K(!f.4T(b.9.33)&&b.9.1e)a=!0,c.1G="1I 2B 2N 2S (cG)";1l K(!b.9.21||b.9.21.P<3)a=!0,c.1G="1I 4M 2S";1l K(!b.9.1Q||b.9.1Q.P<5)a=!0,c.1G="1I 4s 6c";1l K(b.9.2F){K(b.9.32&&b.9.32.P>0&&(a=e.5N(b.9.33)))T}1l a=!0,c.1G="1I 7L 2t";1l"4v"===b.9.1j&&(!b.9.2f||b.9.2f.P<10?(a=!0,c.1G="1I 7p 2S"):b.9.3L||(a=!0,c.1G="1I 7p 8b"));1l a=!0,c.1G="1I 2D 24";1l a=!0,c.1G="1I 2D 6t";1l a=!0,c.1G="1I 2D 2t";K(a){E g=d.3c({3b:!0,2x:"1B/5d.1C",1y:"5f",3s:"14",3i:{3m:B(){T c}}});g.1v.2q(B(){},B(){})}1l e.70(),b.3a("2z","cE",b.9.1j.N())}}]),1w.29("2a").1y("7n",["$2r","$25",B(a,b){a.4V={},a.4V.4r={cI:2,bX:60,bW:10,c0:!1,bV:"bU",bR:"2m",c3:12,cb:"",c9:"#c8"},a.73=b.5Z(b.1c.1D)}]),1w.29("2a").5D("5Y",["4t","$7u","$25","$7t","5T","5E","$3M","5S","$7s","$1V",B(a,b,c,d,e,f,g,h,i,j){E k={};T c.3a=B(a,d,e){K(c.9.4O){c.G&&H.I("3B, c7 = "+a+", c6 = "+d+", c4 = "+e);E f="v=1",g="&c5=ca-ch-7",i=c.9.5X;1x.4Q&&!i?(i=1x.4Q.ci("7X"),i?c.G&&H.I("3B, cg 7W 1U, cf 4j = "+i):(i=h.4P().N(),1x.4Q.cc("7X",i),c.G&&H.I("3B, 7W 2h 1U, 3r 4j 85 = "+i))):i||(i=h.4P().N(),c.9.5X=i,c.G&&H.I("3B, 4Q 2h ce, 3r 4j 85 = "+i));E j="&c2="+i,k="&83=bS";c.9.W&&(k="&83="+c.9.W.N());E l="&t=bT",m="&bQ=%bO",n="&bP=7N",o="&cd=7N",p="&an="+c.9.4R.N(),q="&7O=4g-24-67-38";c.9.1i&&(q="&7O="+c.9.1i.N());E r="&av="+c.9.3E.N(),s="&c1="+a.N(),t="&bZ="+d.N(),u="&bY="+e.N(),v="68://38.ck-cj.6j/cH?"+f+g+j+k+l+m+n+o+p+q+r+s+t+u,w={5b:"4H",35:v};b(w).2q(B(a){c.G&&H.I("3B, 6Q 6P cC, 6O = "+1a.1k(a))},B(a){c.G&&H.I("3B, 6Q 6P 4z, 6O = "+1a.1k(a))})}},k.3x=B(a){T 18.3x(a).N()},k.2J=B(a){T 18.2J(a).N()},k.1Y=B(a,b){T"cD="+a+"&cq="+1a.1k(b,1m,"")},k.2C=B(d,e){c.3e=!0;E g=c.9.53;K(c.9.1Z){E h=18.3f(c.9.W+c.9.1i+c.2u).N();g="5a "+a.2v(18.28.2V(c.9.1N.N(),h).N(18.2Z.34)+":"+18.28.2V(c.9.1P.N(),h).N(18.2Z.34))}E i={5b:"4H",35:d,5o:{5y:"3F/3C",8o:g,"5z-3y":"3F/x-38-S-5K","5J-3y":"3C","8w-8v":c.9.3E},1L:e};b(i).2q(B(a){K(c.3e=!1,a.1L.2s)c.G&&H.I("1X 8q 5O 1L 5F 2s:"+a.1L.2s),f.4G(d,a.1L.1v);1l K("cr"===a.6H){K(c.G&&H.I("1X cs: \\n"+1a.1k(a.1L,1m,"")),a.1L.2s===!1)31(a.1L.1v.cp){2Q co:2Q cl:c.G&&H.I(c.1h.4Z),f.1q({1z:c.1h.4Z}),c.2O&&c.2O(!1,c.1h.4Z);3g;2Q cm:c.9.1e=!0}(d===c.36||d===c.3X)&&f.4G(d,a.1L)}1l c.G&&H.I("aD 4H 6a 4z: "+a.6H)},B(){c.3e=!1,c.G&&H.I(c.1h.57),f.1q({1z:c.1h.57}),c.2O&&c.2O(!1,c.1h.57)})},k.ct=B(a){c.3e=!0;E d={5b:"cA",35:a,5o:{5y:"3F/3C","5z-3y":"3F/x-38-S-5K","5J-3y":"3C"}};b(d).2q(B(){c.3e=!1},B(){c.3e=!1,c.G&&H.I("cB cz cy")})},k.3v=B(){E a=c.9.1r;K(c.9.1Z){E b=18.3f(c.9.W+c.9.1i+c.2u).N();a=18.28.2V(c.9.1r.N(),b).N(18.2Z.34)}c.G&&H.I("(1d 1) 54:"+a);E d=k.3x(a).N(),e=c.9.W+c.9.1i+d;c.G&&H.I("(1d 2) cv + cw + cx(54):"+e);E f=k.2J(e).N();T c.G&&H.I("(1d 3) 2J(bM 3K 1d 2):"+f),f},k.5r=B(a){E b=c.9.1r;K(c.9.1Z){E d=18.3f(c.9.W+c.9.1i+c.2u).N();b=18.28.2V(c.9.1r.N(),d).N(18.2Z.34)}E e=c.9.1s,f=c.9.W,g=c.9.20,h=b,i=a,j=k.3x(e+f+g+h+i).N();T j},k.8F=B(){E a=c.9.1r;K(c.9.1Z){E b=18.3f(c.9.W+c.9.1i+c.2u).N();a=18.28.2V(c.9.1r.N(),b).N(18.2Z.34)}E d=c.9.1s,e=c.9.W,f=c.9.2j,g=a,h="4C",i=k.3x(e+h+f+d+g).N();T i},k.5w=B(){E a=c.9.1r;K(c.9.1Z){E b=18.3f(c.9.W+c.9.1i+c.2u).N();a=18.28.2V(c.9.1r.N(),b).N(18.2Z.34)}E d=c.9.1s,e=c.9.W,f=c.9.20,g=a,h="4D",i=e+h+f+d+g;c.G&&H.I("5w b1:"+i);E j=k.3x(i).N();T j},c.b0=B(a){E b=c.6f,d=c.9.W+a+c.9.39,e=d+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+e);E f=k.2J(e).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+f);E g={4N:c.9.W,aZ:a+c.9.39},h=k.1Y(f,g);c.G&&H.I("(1d 6) 2P 1Y:"+h),k.2C(b,h)},k.6e=B(){E a=c.4F,b=c.9.W+c.9.2d,d=b+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+d);E e=k.2J(d).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+e);E f={4N:c.9.W,7a:c.9.2d},g=k.1Y(e,f);c.G&&H.I("(1d 6) 2P 1Y:"+g),k.2C(a,g)},k.72=B(){E a=c.4A,b=c.9.W,d=b+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+d);E e=k.2J(d).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+e);E f={4N:c.9.W},g=k.1Y(e,f);c.G&&H.I("(1d 6) 2P 1Y:"+g),k.2C(a,g)},k.5Q=B(){E a="aX",b=c.9.2M,d=c.4B,e=6Z("+"),f=1t(c.9.1J).5P("+",e),g=c.9.W+c.9.1F+c.9.1H+c.9.1J+c.9.1i+a+b,h=g;c.G&&H.I("(1d 4) 3P 46:"+h);E i=k.2J(h).N(),j=i+k.3v();c.G&&H.I("(1d 5) 41(1v 3K 1d 4) + 4a 3w:"+j);E l={3U:c.9.W,6p:c.9.1F,5q:c.9.1H,5l:f,5m:c.9.1i,3T:a,1V:b},m=k.1Y(j,l);c.G&&H.I("(1d 6) 2P 1Y:"+m),k.2C(d,m)},k.79=B(){k.6e(),k.72(),c.9.1F&&c.9.1H&&c.9.1J&&k.5Q()},k.70=B(){c.2b="6r";E a=c.2b,b=c.36,d=6Z("+"),e=1t(c.9.1J).5P("+",d),f={4q:c.9.1s,5m:c.9.1i,8R:c.9.2i,5q:c.9.1H,5l:e,6p:c.9.1F,1D:c.9.1j,5R:c.9.2d,3D:c.9.3D,3U:c.9.W,3T:a,8N:c.9.20,58:c.9.58,4h:c.9.2p,54:k.5r(a),2f:c.9.2f,1V:c.9.2M,aY:c.9.59};"2B"===c.9.1j||"6y"===c.9.1j?(f.4M=c.9.21,f.3Q=c.9.3Q,f.3Y=c.9.3Y,f.b3=c.9.2F,!c.9.1e&&c.9.2H?f.2H=c.9.2H:f.b4=c.9.33):"4v"===c.9.1j&&(f.2f=c.9.2f,f.3L=c.9.3L),c.3S&&(f.3S=c.3S),c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(f,1m,"")),g.2L("/2R").1R(),k.2C(b,f)},k.8V=B(){E a=c.3X,b="";c.G&&H.I("bN 8Q 5O 35:"+a),k.2C(a,b)},c.3W=B(){c.2b="4C";E a=c.2b,b=c.36,d={3U:c.9.W,69:c.9.2j,4q:c.9.1s,4b:k.8F(),3T:a};c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(d,1m,"")),g.2L("/2R").1R(),k.2C(b,d)},k.5x=B(){c.2b="4D";E a=c.2b,b=c.36,d={3U:c.9.W,b8:c.9.20,4q:c.9.1s,4b:k.5w(),3T:a};c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(d,1m,"")),g.2L("/2R").1R(),k.2C(b,d)},k.b5=B(){c.2b="7y";E a=c.2b,b=c.36,d={4q:c.9.1s,8N:c.9.20,4h:c.9.2p,5R:c.9.2d,3U:c.9.W,54:k.5r(a),1D:"b6",6p:c.9.1F,5q:c.9.1H,5l:c.9.1J,5m:c.9.1i,8R:c.9.2i,3D:c.9.3D,3T:a};c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(d,1m,"")),g.2L("/2R").1R(),k.2C(b,d)},k.8X=B(d){E e=d;K(c.G&&H.I("3A 44, 5H ="+e),e){c.9.4c=!1,c.9.4e=!0;E f=c.5k,g=c.9.W+e,h=g+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+h);E j=k.2J(h).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+j);E l={4N:c.9.W,3A:e},m=k.1Y(j,l);c.G&&H.I("(1d 6) 2P 1Y:"+m);E n=c.9.53;c.9.1Z&&(n="5a "+a.2v(18.28.2V(c.9.1N.N(),c.9.W+c.9.1i).N(18.2Z.34)+":"+18.28.2V(c.9.1P.N(),c.9.W+c.9.1i).N(18.2Z.34)));E o={5b:"4H",35:f,5o:{5y:"3F/3C",8o:n,"5z-3y":"3F/x-38-S-5K","5J-3y":"3C","8w-8v":c.9.3E},1L:m};b(o).2q(B(a){K(c.9.4e=!1,a.1L.2s&&(c.G&&H.I("1X 8q 5O 1L 5F 2s:"+a.1L.2s),8r(a.1L.2s)&&(c.9.4c=8r(a.1L.1v.2s),!c.9.4c))){E b={};b.5i="1I 3j 5A",b.1G="1I aL 2N 2S";E d=i.3c({3b:!0,2x:"1B/5d.1C",1y:"5f",3s:"14",3i:{3m:B(){T b}}});d.1v.2q(B(){},B(){c.9.2e=""})}},B(){c.9.4e=!1})}},k.5N=B(a){E b=!1,d=a;K(c.G&&H.I("3A 4x 44, 5H ="+d),d){d.P>5&&(d=a.1b(0,6),c.G&&H.I("3A 4x 44, 5H ="+d)),c.G&&H.I("3A 4x 44, 32 =",c.9.32);E e=j("1V")(c.9.32,d,!0);K(c.G&&H.I("3A 4x 44, 1U =",e),0===e.P){E f={};f.5i="1I 3j 5A",f.1G=c.9.8e;E g=i.3c({3b:!0,2x:"1B/5d.1C",1y:"5f",3s:"14",3i:{3m:B(){T f}}});T g.1v.2q(B(){},B(){c.9.1e&&(c.9.2e="")}),b=!0}}T b},k}]),1w.29("2a").5D("5E",["$25","4t","$3M","$1V",B(a,b,c,d){E e={};T e.6w=B(b){K(b){a.9.2w=b,a.2O&&a.9.2w.P>0&&a.2O(!0);E c="";a.5G()&&(c=d("1V")(a.9.2w,{5g:"2B"},!0),c.P&&(a.G&&H.I("1U 5F aN = "+c),a.9.2w.aO(c.2c,1))),0===a.9.2w.P&&(a.G&&H.I(a.1h.4y),e.1q({1z:a.1h.4y}),a.2O&&a.2O(!1,a.1h.4y)),"3O"!==a.9.1j?(c=d("1V")(a.9.2w,{5g:a.9.1j},!0),c.P?a.9.2T=c[0].5C:(a.9.1j="3O",a.9.2T="(3u 3I a 1D)")):(a.9.1j="3O",a.9.2T="(3u 3I a 1D)"),("3t"===a.9.1O||a.9.2j)&&a.3W()}a.G&&H.I("6w: \\2I: "+1a.1k(a.9.2w,1m,"")),a.3a("7K","7M","bc")},e.6x=B(b){b&&(a.9.22=b,a.9.22.P>0?a.9.1e=!1:a.9.1e=!0),a.G&&H.I("6x: \\2I: "+1a.1k(a.9.22,1m,""))},e.6u=B(b){b&&(a.9.5h=b),a.G&&H.I("6u: \\2I: "+1a.1k(a.9.5h,1m,""))},e.48=B(c){K(a.G&&H.I("48: \\2I: "+c),c&&c.P>0){E d=b.2v(c);a.G&&H.I("3Z: \\40: "+d);E f=a.7i+d;a.27(f),a.3a("2z","6r","bd")}1l{a.G&&H.I("48: \\bB 1v: "+1a.1k(c));1A{E g=1m;1A{g=1a.3V(c)}1u(h){g=c}K(a.G&&H.I("48: \\bA: "+g),g.8t&&g.6v&&g.6v.P>0){E i=g.8t+", "+g.6v;e.1q({1z:i})}}1u(h){e.1q({1z:a.1h.8A})}}},e.6A=B(b){a.3p=b,a.G&&H.I("6A: \\2I: "+1a.1k(a.3p,1m,"")),a.3p&&""!==a.3p&&(a.9.2j=a.3p.bw,a.9.4b=a.3p.4b,a.3W())},e.6C=B(d){a.1c=d,a.1c.6q&&1===a.1c.6q&&(a.1c.1O="3t"),a.9.1O&&(a.1c.1O=a.9.1O,"3t"===a.1c.1O&&a.1c&&a.1c.3H&&"11"===a.1c.3H&&(a.G&&H.I("3t 2s 4z, by bD bE"),a.1c.1O="")),a.G&&H.I("6C: \\2I: "+1a.1k(a.1c,1m,""));E e=b.2v(1a.1k(a.1c,1m,""));a.G&&H.I("3Z: \\40: "+e);E f=a.42+e;a.27(f),("3t"===a.9.1O||1===a.1c.6q)&&a.1c&&a.1c.3H&&"11"!==a.1c.3H&&c.2L("/3q").1R();E g=a.1c.3H;g||(g="77"),a.3a("74","4C",g.N())},e.6B=B(c){a.49=c,a.9.1O&&(a.49.1O=a.9.1O),a.G&&H.I("6B: \\2I: "+1a.1k(a.49,1m,""));E d=b.2v(1a.1k(a.49,1m,""));a.G&&H.I("3Z: \\40: "+d);E e=a.42+d;a.27(e);E f=a.49.3H;f||(f="77"),a.3a("74","4D",f.N())},e.6D=B(c){a.6s=c,a.G&&H.I("6D: \\2I: "+1a.1k(a.6s,1m,""));E d=b.2v(1a.1k(a.6s,1m,""));a.G&&H.I("3Z: \\40: "+d);E e=a.42+d;a.27(e)},e.1q=B(d){E e=d;e.71=a.9.71,c.2L("/2R").1R(),a.G&&H.I("1q: \\2I: "+1a.1k(d,1m,""));E f=b.2v(1a.1k(d,1m,""));a.G&&H.I("3Z: \\40: "+f);E g=a.42+f;a.27(g),a.3a("7K","7M","bv")},e.4G=B(b,c){31(a.G&&H.I("4G: \\7Z: "+b),b){2Q a.4F:e.6w(c);3g;2Q a.4B:e.6x(c);3g;2Q a.4A:e.6u(c);3g;2Q a.bu:e.bj(c);3g;2Q a.36:"6r"===a.2b?e.48(c):"4C"===a.2b?e.6C(c):"4D"===a.2b?e.6B(c):"7y"===a.2b&&e.6D(c);3g;2Q a.3X:e.6A(c);3g;be:a.G&&H.I("bl bm\'t bs a bt")}},e}]),1w.29("2a").1y("8n",B(){}),1w.29("2a").1y("8C",["$2r","$47","$25",B(a,b,c){a.7B=B(a){c.9.1j=a.5g,c.9.2T=a.5C,"4v"===c.9.1j?c.8J():c.9.1O="",b.2G()},a.1W=B(){b.2G()}}]),1w.29("2a").1y("8W",["$25","$2r","$47",B(a,b,c){b.7Y=B(b){a.9.2F=b.2t,c.2G()},b.1W=B(){c.2G()}}]),1w.29("2a").1y("8a",["$2r","88","$25","$47",B(a,b,c,d){a.8j=b.5B(),a.8m=B(a){c.9.2k=a[0],d.2G()},a.1W=B(){d.2G()}}]),1w.29("2a").1y("5f",["$2r","$47","3m",B(a,b,c){a.3m=c,a.1W=B(){b.2G()}}]),1w.29("2a").1y("8c",["$2r","$47","$25",B(a,b,c){a.7r=B(a){c.9.1p=a,b.2G()},a.1W=B(){b.2G()}}]),1w.29("2a").8L(["$bo",B(a){a.2K("1B/5d.1C",\' <6F>{{3m.5i}} <86>{{3m.1G}} <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/7l.1C",\' {{ O.2t }} <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/7I.1C",\' {{ O.65 }} ****** {{ O.64 }} {{ O.bp }} <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/7D.1C",\' {{ O.5C }} <4m y="1D-76" F-5s="{{ O.6L }}"> <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/80.1C",\' {{ O[1] }} <1f y="1W-1f" Z="1f" F-1g="1W()">bn \'),a.2K("1B/2R.1C",\'

br 3j 2s.

3u bg.

\'),a.2K("1B/bf.1C",\'

<8K>1S X-bh

1r 2i 20 1N 1F 2p 2d W 1H 1J 1i 1P 1s 4o 1j <1f F-1g="6T()">7j \'),a.2K("1B/3d.1C",\' bG 4j {{9.20}} {{9.2d}} {{9.1s}} &2g; &2g; &2g; &2g; 7j bI &2g; {{9.2T}} bL 2N <4k-31 F-19="9.1e" y="3r-2B-2N-31" 4J-J="bK" bx-J="8i"><4k-31> 8B 2S &2g; 8p &2g; 8G 6c &2g; aQ &2g; {{9.4i}} 8f 2t &2g; {{9.2F}} {{9.8E}} aR 8x aT (aS = 4l 8x aM) {{9.5M}} 8B# aG 43 &2g; aH &2g; <1f F-1g="89()" y="8g-1f" F-aI="8k()">&2g;aU <4m F-5s="aV/8M.b7" y="8M"> V{{9.3E}} \'),a.2K("1B/3q.1C",\' <4m y="3q-76" F-5s="{{ 73 }}"> aW 1S {{1c.1D}} b2 4j {{1c.69}} <3o Z="6R" 81="4m" 62="{{1c.69}}" 4r="4V.4r"> {{1c.6I}} {{1c.7C}} <3o Z="6R" 81="4m" 62="{{1c.7C}}" 4r="4V.4r"> 9z 4q {{1c.5R}}{{1c.a9}} aa <7P y="D-M-O 1o-D-M-O 6g" F-4f="O 4d 1c.6g"> {{ O }} \')}]);',62,789,'|||||||||sdkData|||||||||||||||||||||||||class|div||function|span|list|var|ng|isInternalDebugging|console|log|label|if|value|group|toString|item|length|right|fa|form|return|pull||mp_merchant_ID||input|type||||text|sm|control||col|CryptoJS|model|JSON|substring|C5ResultData|Step|new_credit_card|button|click|sdkConstants|mp_app_name|mp_channel|stringify|else|null|left|modal|current_token|commErrorHandler|mp_verification_key|mp_amount|String|catch|result|angular|window|controller|Error|try|views|html|channel|show|mp_bill_name|errorDesc|mp_bill_email|Invalid|mp_bill_mobile|void|data|MPdomain|mp_username|mp_request_type|mp_password|mp_credit_card_expiry|replace|MOLPay|mp_editing_enabled|found|filter|close|API|Payload|mp_encrypt_credentials|mp_order_ID|mp_credit_card_cvv|available_token|placeholder|mobile|rootScope|php|callNativeWebview|AES|module|molpayXsdkApp|CurrentMsgType|index|mp_currency|mp_credit_card_no_display|bcard_no|nbsp|not|mp_bill_description|mp_transaction_id|mp_credit_card_country|body|center|search|trim|mp_country|then|scope|status|name|seed|encode|available_channel|templateUrl|circle|Payment|times|credit|HttpPost|billing|lg|mp_credit_card_bank|dismiss|token|nresult|SHA1|put|path|mp_filter|card|testMerchantCredentialsCallback|The|case|finalizingpayment|number|mp_channel_title|opt|decrypt|mod|InternalUsed|requestPath|enc|mp_channel_editing|switch|mp_bin_lock|mp_credit_card_no|Utf8|url|MobileNewApiUrl|hide|www|device_info|GaTrackEvent|animation|open|paymentinfo|isLoading|SHA256|break|container|resolve|payment|updateSdkData|watch|alertdata|MY|barcode|B4ResultData|receipt|new|size|Receipt|Please|PasswordHash|password|MD5|Type|aligned|BIN|gaTrackEvent|json|l_version|sdk_version|application|readonly|status_code|select|encrypt|of|bcard_pin|location|transactionRequest|multi|all|month|document|in_app_mode|msgType|merchant_id|parse|ApiC5|B4ResultUrl|year|htmlStringBase64|nhtmlStringBase64|sha1|nativeWebTransactionResults||Check|indexOf|variables|uibModalInstance|B3Handler|D7ResultData|checksum|chksum|bin_checked|in|bin_checking_in_progress|repeat|molpay|country|mp_credit_card_country_title|ID|toggle|100|img|tel|mp_debug_mode|footer|amount|options|exp|base64|please|pointbcard|chevron|Lock|NoChannelFoundCheckCurrencyValue|failed|GetBankListUrl|T1Url|C5|D7|controllerAs|GetAvailableChannelByIdUrl|OnApiResponseReceived|POST|xxxx|on|Billing|billinginfo|cvv|merchantID|mp_ga_enabled|generate|localStorage|module_id|setTimeout|check|addCustomCSS|vm|inAppCallback|isDeploy|cdomain|AccessDeniedMidAppnameVerificationkey|expdate|when|mp_preferred_token|authData|vcode|searchString|wrapper_version|CommunicationError|token_status|mp_is_escrow|Basic|method|marginless|alertmodal|listgroup|AlertModalCtrl|maskname|available_banklist|errorTitle|CLOSE|IsDebitCardUrl|bill_mobile|app_name|row|headers|testMerchantCredentials|bill_email|VcodeHash|src|SecuredEncryptionFailed|icon|Android|ChecksumForD7|ApiD7|Accept|Content|information|getCountries|title|factory|ApiHandlerService|and|isBelowAndroid44|binValue|bcard|Data|urlencoded|closemolpay|bcard_point|BinLockCheck|with|replaceAll|ApiT1|cur|uuid4|deviceDetector|molpayResultString|device|header|mp_ga_userid|AuthenticationService|getChannelLogoFromChannelName||nativeWebCloseAllWindows|string|PaymentInfoCtrl|bin4|bin|nativeWebRunScriptOnPopup|xdk|https|txn_ID|request|bar|date|AmountNotFound|ApiGetAvailableChannelById|PaymentRecordsLogUrl|notes|Malaysia|domain_mode|com|isStarting|css|mp_custom_css_url|app|webview_url_prefix|bill_name|pInstruction|B3|E9ResultData|email|GetBankListHandler|error_message|GetAvailableChannelByIdHandler|T1Handler|credit3|split|B4Handler|D7Handler|C5Handler|E9Handler|coreVersion|h4|block|statusText|pcode_lbl|checkIfThisIsAValidCountryCode|InvalidCountryCode|logo_url|VerificationKeyNotFound|Search|response|beam|ga|code128c|CountryNotFound|onPayClicked|mp_is_secure|getElementById|element|display|onChannelListClicked|encodeURIComponent|ApiB3|mp_transaction_request_type|ApiGetBankList|toplogourl|PaymentStatus|onBillingInfoChanged|logo|unknown|getChannelMasknameFromChannelName|PreloadData|currency|PasswordNotFound|MerchantIdNotFound|AppNameNotFound|OrderIdNotFound|MPSecondaryDomain|UsernameNotFound|toFixed|nativeWebOpenMOLPayWindow|Pay|CurrencyNotFound|banklistmodal|resultform|ReceiptCtrl|Run|BCard|hlbFailedString|onCardSelected|uibModal|timeout|http|hlbSuccessString|script|popup|E9|extend|callback|onChannelSelected|pcode|channelmodal|luhn|closeAll|_|iphone|cardlistmodal|maybankSuccessString|Main|bank|PaymentInfo|MOLPayPayment|aid|li|timeoutHttpIntercept|recordsLog|GetAvailableChannelById|GetBankList|IsDebitCard|mobile_new|gaClientId|mpUserId|onBankSelected|nurl|countrylistmodal|render|chips|uid|TransactionIdForReceiptRequestNotFound|generated|h5|RegExp|Countries|proceedClicked|CountrylistModalCtrl|pin|CardlistModalCtrl|xxx|mp_bin_lock_err_msg|Bank|proceed|issuer_bank|No|countryArray|proceedDisabled|parseInt|onCountrySelected|FinalizingPaymentCtrl|Authorization|CVV|responded|Boolean|larger|error_code|point|Version|SDK|BCARD|onCardNumberClicked|or|UnhandledErrorContactSupport|Card|ChannelModalCtrl|bank_country|credit_disclaimer|ChecksumForC5|Exp|focus|MPMainDomain|updateBCardPoints|h2|run|poweredByMOLPay|orderid|onCountrylistClicked|MM|B4|bill_desc|disclaimer|createTextRange|onBanklistClicked|ApiB4|BanklistModalCtrl|IsDebitCardCheck|verification|returned|B2C_paymentProcessed|change|Communication|internet|nativeWebRequestUrlUpdatesOnFinishLoad|connection|key|B2C_paymentFailed|link|Maybank2U|unescape|assign|success|mprunscriptonpopup|parameters|maha|nativeWebRequestUrlUpdates|interceptors|denied|submit|routeProvider|redirectTo|config|otherwise|Access|use|merchant|username|m2uTicketsPaymentConfirmed|id|1e4|mptransactionresults|httpProvider|do|HLB|Payable|_self|target|Online|creditCardInput|nativeWebClosePopupAndRunScriptOnMOLPayWindow|mpopenmolpaywindow|setCaretPosition|countries|mpopenpopup|move|typeof|ngRoute|leodido|ngSanitize|gi|userAgent|raw|directive|isString|nativeWebOpenPopup|injector|setSelectionRange|add|fileUrl|strict|my|selectionStart|pay|isNumber|parseFloat|exec|character|apply|ngTouch|error|payable_amt|Note||onlinepayment|support|contact|mpclosepopupandrunscriptonmolpaywindow|Status|Unhandled|enableInAppMode|restrict|push|getDeviceInfo|Secured||mpcloseallwindows|MYR|this|mp_url_scheme|mp_authData|ui|prototype||transactionRequestWithOrderId|cssInjector|encryption|FastClick|attach|bootstrap|for|Http|digit|Last|6298|Pin|disabled|spin|spinner|debit|Points|removed|splice|YYYY|Country|Use|RM1|points|PROCEED|images|Services|T1|is_escrow|message|ApiRecordsLog|checksumString|Transaction|bank_name|cardnumber|ApiE9|MOLWallet|png|order_ID|transactionRequestWithTransactionId|version|mp|Initiate|Success|default|main|wait|Platform|horizontal|GenBarcodeHandler|checkbox|Response|doesn|Close|templateCache|debit_credit|vertical|Finalizing|have|handler|ApiGenBarcode|CommError|tranID|off|just|YY|nerrorResult|nJSON|cvc|send|results|description|Order|offset|through|creditcard|Yes|New|Result|Get|2Fpaymentinfo|dt|dp|textAlign|none|event|monospace|font|quite|height|el|ea|displayValue|ec|cid|fontSize|eLabel|tid|eAction|eCategory|000|lineColor|UA|backgroundColor|setItem||available|reuse|existing|29894240|getItem|analytics|google|1002|1003|nwebview_url_prefix|1001|code|Params|OK|Returned|HttpGet|convertSafeBase64StringBackToOriginalVersion|mID|appName|md5|Sent|Not|GET|Request|sent|Checksum|Proceed|MainCtrl|LUHN|collect|width'.split('|'),0,{})) diff --git a/MOLPayXDKExample/platforms/ios/platform_www/plugins/molpay-mobile-xdk-cordova/molpay.js b/MOLPayXDKExample/platforms/ios/platform_www/plugins/molpay-mobile-xdk-cordova/molpay.js index c7a2cff..8592df9 100644 --- a/MOLPayXDKExample/platforms/ios/platform_www/plugins/molpay-mobile-xdk-cordova/molpay.js +++ b/MOLPayXDKExample/platforms/ios/platform_www/plugins/molpay-mobile-xdk-cordova/molpay.js @@ -1,3 +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://",molpayresulturl="https://www.onlinepayment.com.my/MOLPay/result.php",molpaynbepayurl="https://www.onlinepayment.com.my/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){isInternalDebugging&&console.log("postMolpayResultHandler innHtml = "+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),isInternalDebugging&&console.log("innHtmlString = "+b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(isInternalDebugging&&console.log("onMolpayUiFrameLoad B4 results = "+b),g=JSON.parse(b))){var h=g.tranID;h&&(isInternalDebugging&&console.log("mainUiFrame.contentWindow.transactionRequestWithTransactionId = "+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){isInternalDebugging&&console.log("onBankUiLoadstop event.url ="+a.url);var b;b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpaynbepayurl found"),bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){isInternalDebugging&&console.log("bankUiWindow window.open to window.location inject ok")}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){isInternalDebugging&&console.log("bankUiWindow window.close to window.location.assign inject ok")}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){isInternalDebugging&&console.log("onBankUiLoadstart event.url = "+a.url);var b;if(b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstart molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b),postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)){isInternalDebugging&&console.log("onBankUiLoadstart molpaynbepayurl found");var c=10,f=0,g=setInterval(function(){h()},1e3),h=function(){f++,f>c?clearInterval(g):bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b);var c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(g))})}}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){var b,c;if(a&&a.indexOf(mpopenmolpaywindow)>-1)c=new RegExp(mpopenmolpaywindow,"g"),b=a.replace(c,""),b&&b.length>0&&(isInternalDebugging&&console.log("inAppCallback base64HtmlString = ",b),createBankUiWindow(b));else if(a&&a.indexOf(mptransactionresults)>-1&&(c=new RegExp(mptransactionresults,"g"),b=a.replace(c,""),b&&b.length>0)){var d=window.atob(b),e=JSON.stringify(JSON.parse(d));transactionResultCallback(e),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(c=new RegExp(mprunscriptonpopup,"g"),b=a.replace(c,""),b&&b.length>0)){var f=window.atob(b);isInternalDebugging&&console.log("run script on popup, script ="+f),bankUiWindow.executeScript({code:f},function(a){isInternalDebugging&&console.log("run script on popup ok")})}},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isInternalDebugging&&console.log("MOLPay startmolpay paymentdetails = "+JSON.stringify(a,null,"")),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(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){isInternalDebugging&&console.log("MOLPay transactionRequest paymentdetails = "+JSON.stringify(a,null,""));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(){isClosingMolpay=!0,mainUiFrame.contentWindow.transactionRequest()};var molpay=new MOLPay;module.exports=molpay; +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://",molpayresulturl="https://www.onlinepayment.com.my/MOLPay/result.php",molpaynbepayurl="https://www.onlinepayment.com.my/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){isInternalDebugging&&console.log("postMolpayResultHandler innHtml = "+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),isInternalDebugging&&console.log("innHtmlString = "+b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(isInternalDebugging&&console.log("onMolpayUiFrameLoad B4 results = "+b),g=JSON.parse(b))){var h=g.tranID;h&&(isInternalDebugging&&console.log("mainUiFrame.contentWindow.transactionRequestWithTransactionId = "+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){isInternalDebugging&&console.log("onBankUiLoadstop event.url ="+a.url),mainUiFrame.contentWindow.nativeWebRequestUrlUpdatesOnFinishLoad({requestPath:a.url});var b;b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpaynbepayurl found"),bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){isInternalDebugging&&console.log("bankUiWindow window.open to window.location inject ok")}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){isInternalDebugging&&console.log("bankUiWindow window.close to window.location.assign inject ok")}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){isInternalDebugging&&console.log("onBankUiLoadstart event.url = "+a.url);var b;if(b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstart molpayresulturl found"),mainUiFrame.contentWindow.nativeWebRequestUrlUpdates({requestPath:a.url})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)){isInternalDebugging&&console.log("onBankUiLoadstart molpaynbepayurl found");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];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b);var c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(f))})}}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){var b,c;if(a&&a.indexOf(mpopenmolpaywindow)>-1)c=new RegExp(mpopenmolpaywindow,"g"),b=a.replace(c,""),b&&b.length>0&&(isInternalDebugging&&console.log("inAppCallback base64HtmlString = ",b),createBankUiWindow(b));else if(a&&a.indexOf(mpcloseallwindows)>-1)isInternalDebugging&&console.log("inAppCallback closing bankUiWindow"),bankUiWindow.close();else if(a&&a.indexOf(mptransactionresults)>-1&&(c=new RegExp(mptransactionresults,"g"),b=a.replace(c,""),b&&b.length>0)){var d=window.atob(b),e=JSON.stringify(JSON.parse(d));transactionResultCallback(e),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(c=new RegExp(mprunscriptonpopup,"g"),b=a.replace(c,""),b&&b.length>0)){var f=window.atob(b);isInternalDebugging&&console.log("run script on popup, script ="+f),bankUiWindow.executeScript({code:f},function(a){isInternalDebugging&&console.log("run script on popup ok")})}},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isInternalDebugging&&console.log("MOLPay startmolpay paymentdetails = "+JSON.stringify(a,null,"")),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){isInternalDebugging&&console.log("MOLPay transactionRequest paymentdetails = "+JSON.stringify(a,null,""));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(){isClosingMolpay=!0,mainUiFrame.contentWindow.transactionRequest()};var molpay=new MOLPay;module.exports=molpay; }); 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 c013960..e2abc45 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 @@ -

Loading.

Please wait.

Loading...
\ No newline at end of file +

Loading.

Please wait.

Loading...
\ No newline at end of file diff --git a/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/scripts.f29f8607.js b/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/scripts.f29f8607.js new file mode 100644 index 0000000..d29f2bb --- /dev/null +++ b/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/scripts.f29f8607.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}('"9p 9Y";1w.29("2a",["9L","9N","a7","ab-4t","F.5T","at.aB","9D","9f.9H","4k-31","3o","5S","1w.6l.9U","9M.7E"]).9R("4L",["$25",B(a){T{aj:"A",98:B(b,c,d){c.4J("91",B(){a.75()})}}}]).5D("7Q",B(){T{6a:B(a){T a.7t=9u,a}}}).9m(["$9k","$9w",B(a,b){a.51("/",{2x:"1B/3d.1C",1y:"63",4E:"3d"}).51("/3d",{2x:"1B/3d.1C",1y:"63",4E:"3d"}).51("/3q",{2x:"1B/3q.1C",1y:"7n",4E:"3q"}).51("/2R",{2x:"1B/2R.1C",1y:"8n",4E:"2R"}).9n({9l:"/"}),b.9h.ak("7Q")}]).8L(["$25","$3M","$7u","4t","5Y","5T","88","$1V","5E","ax","5S",B(a,b,c,d,e,f,g,h,i,j,k){az.aA(3R.2l),1t.au.5P=B(a,b,c){T aq.1R(3r 87(a.1R(/([\\/\\,\\!\\\\\\^\\$\\{\\}\\[\\]\\(\\)\\.\\*\\+\\?\\|\\<\\>\\-\\&])/g,"\\\\$&"),c?"9O":"g"),"62"==9K b?b.1R(/\\$/g,"$$$$"):b)},a.55=B(a,b){E c=3r 87(a,"g"),d=c.a4(b);T d},a.4X=!0,a.G=!1,a.6E="2.2.",a.4X||(a.G=!0),a.8I="68://38.ac.6j.9Z/",a.7f="68://a1.4g.6j/",a.1M=a.8I,a.6f=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7R",a.4F=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7S",a.4A=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7T",a.5k=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7U",a.36=a.1M+"1S/1X/7V/2c.26",a.4B=a.1M+"1S/1X/82/2c.26",a.3X="",a.2b="",a.3p="",a.9T="9I://",a.7i="9F://",a.61="ao://",a.9E="af://",a.66="9d://",a.42="9v://",a.5U=a.1M+"1S/1v.26",a.7J="9s.9x",a.7v="90",a.7q="97",a.3e=!1,a.6k=!0,a.3S=!1,a.1h={57:"92 1z, 4u 4T 93 95, 9r, 8z 3w",4Z:"9o 9i, 4u 4T 9q 9t, 6n 2t, 8z 8Y 96",4y:"8i 1D 1U, 4u 4T 7a L",7g:"1N L 2h 1U",7b:"1P L 2h 1U",7c:"W L 2h 1U",7d:"1i L 2h 1U",7e:"20 L 2h 1U",6d:"1s L 2h 1U",7k:"2d L 2h 1U",6S:"2p L 2h 1U",6K:"1I 2p L",6M:"1r L 2h 1U",84:"2j L aC 3q 6a 2h 1U",8A:"ah a8, 4u ae ad",5t:"am ay 4z"},a.9={1N:"",1P:"",W:"",1i:"",20:"",1s:"",2d:"ap",2p:"3n",1r:"",1Z:!0,6U:!1,1j:"",30:!0,1T:"",1F:"",1H:"",1J:"",2i:"",59:"0",4o:!1,ar:"",2j:"",1O:"",4b:"",3D:"2",as:"",3E:"",39:"",56:"",4R:"4g-24-67-38",33:"",21:"",1Q:"",2F:"",3Q:"",3Y:"",2H:"",1e:!0,2k:"3n",4i:"6h",2e:"",2f:"",3L:"",5M:"",58:"1",2w:"",22:"",1p:"",5h:"",2T:"",4O:!1,5X:"",2M:"0",4c:!1,4e:!1,6m:"",4Y:"",6i:"",8E:"",6o:"",32:"",8e:"",52:""},!a.4X,a.$3l("9.2k",B(){E b=g.5B(),c=h("1V")(b,a.9.2k,!0);c.P?a.9.4i=c[0][1]:a.9.2k=""}),a.$3l("9.1Q",B(){K(a.9.1Q){E b=1t(a.9.1Q);b=b.1R(/\\//g,"");E c="";b.P>4&&(b=b.1b(0,4)),1===b.P&&(c=8l(b.1b(0,1)),c>1&&(b="")),2===b.P&&(c=8l(b.1b(0,2)),c>12&&(b=b.1b(0,1))),b.P>2&&(b=b.1b(0,2)+"/"+b.1b(2,b.P)),a.9.1Q=b,5===a.9.1Q.P&&(a.9.3Q=a.9.1Q.1b(0,2),a.9.3Y=a.9.1Q.1b(3,5))}}),a.$3l("9.2f",B(){K(a.9.2f){E b=1t(a.9.2f);b.P>10&&(b=b.1b(0,10)),a.9.2f=b}}),a.$3l("9.1e",B(){K(a.9.1e)a.9.33="",a.9.2e="",a.9.21="",a.9.1Q="",a.9.2F="",a.9.2k="3n",a.9.4i="6h",a.9.3Q="",a.9.3Y="",a.9.2H="";1l K(a.9.22){K(a.9.22.P>0&&!a.9.1p)K(a.9.52){E b=h("1V")(a.9.22,a.9.52,!0);K(b.P){a.G&&H.I("52 1U : ",b[0]);E c=a.9.22.45(b[0]);a.9.1p=a.9.22[c]}1l a.9.1p=a.9.22[0]}1l a.9.1p=a.9.22[0];a.9.2e=a.9.1p.65+"******"+a.9.1p.64,a.9.21="",a.9.1Q=a.9.1p.50.1b(2,4)+"/"+a.9.1p.50.1b(0,2),a.9.2F=a.9.1p.8h,a.9.2k=a.9.1p.8D,a.9.2H=a.9.1p.2H}}),a.$3l("9.1p",B(){!a.9.1e&&a.9.1p&&(a.9.2e=a.9.1p.65+"******"+a.9.1p.64,a.9.21="",a.9.1Q=a.9.1p.50.1b(2,4)+"/"+a.9.1p.50.1b(0,2),a.9.2F=a.9.1p.8h,a.9.2k=a.9.1p.8D,a.9.2H=a.9.1p.2H)}),a.9G=B(a,b){K(1m!==a)K(a.8T){E c=a.8T();c.9J("a5",b),c.3I()}1l a.a0?(a.8H(),a.9V(b,b)):a.8H()},a.5G=B(){T a.55("5v 4.1",a.9.39)||a.55("5v 4.2",a.9.39)||a.55("5v 4.3",a.9.39)?!0:!1},a.$3l("9.2e",B(){K(a.9.2e){E b=1t(a.9.2e);K(b=b.1R(/ /g,""),6===b.P&&a.9.2M&&"1"===a.9.2M&&e.8X(b),6===b.P&&a.9.32&&a.9.32.P>0){E c=e.5N(b);c&&(a.9.2e="")}b.P>16&&(b=b.1b(0,16)),a.5G()||(b.P>4&&b.P<=8?b=b.1b(0,4)+" "+b.1b(4,b.P):b.P>8&&b.P<=12?b=b.1b(0,4)+" "+b.1b(4,8)+" "+b.1b(8,b.P):b.P>12&&b.P<16&&(b=b.1b(0,4)+" "+b.1b(4,8)+" "+b.1b(8,12)+" "+b.1b(12,b.P))),16===b.P&&(a.9.33=b,b=b.1b(0,4)+" "+b.1b(4,8)+" "+b.1b(8,12)+" "+b.1b(12,16)),b&&(a.9.2e=b)}}),a.$3l("9.21",B(){K(a.9.21){E b=1t(a.9.21);b.P>4&&(b=b.1b(0,4)),a.9.21=b}}),a.75=B(){!a.9.22&&a.9.1F&&a.9.1H&&a.9.1J&&e.5Q()},a.4U=B(b){a.G&&H.I("9X: "+b),j.9W(b)},a.6J=B(a){E b=!1,c=g.5B(),d=h("1V")(c,a,!0);T d.P&&(b=!0),b},a.78=B(b){a.G&&H.I("78: "+b);E c="",d=h("1V")(a.9.2w,{2t:b},!0);T d.P&&(c=d[0].5g),c},a.8J=B(){E b=a.9.1s,c=a3(b);c=4l*c,a.9.5M=c.7h(0)},a.3k=B(){K(!a.9.1s)T 1K i.1q({1z:a.1h.6d});K(1w.a2(a.9.1s))a.9.1s=a.9.1s.7h(2);1l K(1w.9S(a.9.1s)){E b=h("2S")(a.9.1s,2);K(a.9.1s=b,!a.9.1s)T 1K i.1q({1z:a.1h.6d})}K(!a.9.1N)T 1K i.1q({1z:a.1h.7g});1A{a.9.1N=1t(a.9.1N.2o())}1u(c){a.G&&H.I(c)}K(!a.9.1P)T 1K i.1q({1z:a.1h.7b});1A{a.9.1P=1t(a.9.1P.2o())}1u(c){a.G&&H.I(c)}K(!a.9.W)T 1K i.1q({1z:a.1h.7c});1A{a.9.W=1t(a.9.W.2o())}1u(c){a.G&&H.I(c)}K(!a.9.1i)T 1K i.1q({1z:a.1h.7d});1A{a.9.1i=1t(a.9.1i.2o())}1u(c){a.G&&H.I(c)}K(!a.9.20)T 1K i.1q({1z:a.1h.7e});1A{a.9.20=1t(a.9.20.2o())}1u(c){a.G&&H.I(c)}K(!a.9.2d)T 1K i.1q({1z:a.1h.7k});1A{a.9.2d=1t(a.9.2d.2o())}1u(c){a.G&&H.I(c)}K(!a.9.2p)T 1K i.1q({1z:a.1h.6S});1A{a.9.2p=1t(a.9.2p.2o())}1u(c){a.G&&H.I(c)}K(!a.6J(a.9.2p))T 1K i.1q({1z:a.1h.6K});K(!a.9.1r)T 1K i.1q({1z:a.1h.6M});1A{a.9.1r=1t(a.9.1r.2o())}1u(c){a.G&&H.I(c)}K((1K 0===a.9.1Z||1m===a.9.1Z)&&(a.9.1Z=!0),a.9.1N&&a.9.1P&&a.9.1r&&a.9.W&&a.9.1i&&a.9.1Z)1A{K(!a.2u){a.2u=k.4P().N();E g=18.3f(a.9.W+a.9.1i+a.2u).N();a.9.1N=18.28.3J(a.9.1N,g).N(),a.9.1P=18.28.3J(a.9.1P,g).N(),a.9.1r=18.28.3J(a.9.1r,g).N()}}1u(c){i.1q({1z:a.1h.5t})}1l a.9.53="5a "+d.2v(a.9.1N+":"+a.9.1P);K(1K 0===a.9.56&&(a.9.56="x"),a.9.3E=a.6E+a.9.56,a.9.39=f.9Q.9P,a.9.3D="2",a.9.58="1",1K 0===a.9.59&&(a.9.59="0"),a.9.6U=!1,a.9.2M||(a.9.2M="0"),1K 0===a.9.4O&&(a.9.4O=!0),a.9.4R||(a.9.4R="4g-24-67-38"),a.9.30||(a.9.30=!1),a.9.1j?"3O"===a.9.1j&&(a.9.30=!0,a.9.2T="(3u 3I a 1D)"):(a.9.1j="3O",a.9.30=!0,a.9.2T="(3u 3I a 1D)"),a.9.1T||(a.9.1T=!1),a.9.1F&&a.9.1H&&a.9.1J&&a.9.2i&&a.9.1F||(a.9.1T=!0),a.9.1H)1A{a.9.1H=1t(a.9.1H.2o())}1u(c){a.G&&H.I(c)}K(a.9.1J)1A{a.9.1J=1t(a.9.1J.2o())}1u(c){a.G&&H.I(c)}K(a.9.2i)1A{a.9.2i=1t(a.9.2i.2o())}1u(c){a.G&&H.I(c)}K(a.9.1F)1A{a.9.1F=1t(a.9.1F.2o())}1u(c){a.G&&H.I(c)}T a.9.4o||(a.9.4o=!1),a.9.2k="3n",a.9.4i="6h",a.9.1e=!0,"3t"!==a.9.1O||a.9.2j?(a.9.6m?(4S(B(){a.$a6(a.4U(a.9.6m))},0),4S(B(){1w.6W(3R.6V("6n-2l")).6l({6X:"6G"}),a.6k=!1},4l)):(1w.6W(3R.6V("6n-2l")).6l({6X:"6G"}),a.6k=!1),(a.9.6i||a.9.4Y)&&("1"===a.9.6i?a.1M=a.7f:a.9.4Y&&(a.1M=a.9.4Y),a.6f=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7R",a.4F=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7S",a.4A=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7T",a.5k=a.1M+"1S/1X/2X/2c.26?2W=24&2U=2z/7U",a.36=a.1M+"1S/1X/7V/2c.26",a.4B=a.1M+"1S/1X/82/2c.26",a.5U=a.1M+"1S/1v.26"),1K(a.9.1O&&"ag"===a.9.1O?a.3N():e.79())):1K i.1q({1z:a.1h.84})},a.al=B(){T a.9.39},a.5Z=B(b){a.G&&H.I("5Z: "+b);E c="",d=h("1V")(a.9.2w,{2t:b},!0);T d.P&&(c=d[0].6L),c},1x.ai=B(){a.3S=!0},1x.3k=B(b,c){a.9={},c&&(a.4W=c),a.G&&H.I("1x.3k, 7A = "+c);1A{a.9=1a.3V(b)}1u(d){a.9=1w.7z(a.9,b)}a.G&&H.I("1x.3k: $25.9 = "+1a.1k(a.9)),a.3k()},1x.9g=B(b){E c=b.2Y;1A{c=1a.3V(b).2Y}1u(d){c=b.2Y}a.G&&H.I("1L.2Y: "+c);E f="";c.45(a.5U)>-1&&(a.G&&H.I("8Q 1v 8Z"),a.3X=c,e.8V(),f=a.61,a.27(f))},1x.94=B(b){E c=b.2Y;1A{c=1a.3V(b).2Y}1u(e){c=b.2Y}a.G&&H.I("1L.2Y: "+c);E f="",g="",h="",i="";c.45(a.7J)>-1?(a.G&&H.I("99 3j 9c 2L: "+c),g="1x.3M.9b(9a(9e))",h="4S(B(){"+g+"; }, 4l);",i=d.2v(h),f=a.66+i,a.G&&H.I("7o 7w 4J 7x, 35 = "+f),a.27(f)):(c.45(a.7v)>-1||c.45(a.7q)>-1)&&(a.G&&H.I("9y 9C 3j 1v 2L: "+c),g=\'3R.7m.9B="9A"; 3R.7m.9j();\',h="4S(B(){"+g+"; }, 4l);",i=d.2v(h),f=a.66+i,a.G&&H.I("7o 7w 4J 7x, 35 = "+f),a.27(f))},a.7F=B(){E b=a.61;a.27(b)},a.5L=B(){e.5x(),a.7F()},1x.5L=B(){a.5L()},a.3N=B(){"3t"===a.9.1O&&a.9.2j&&""!==a.9.2j?a.3W():a.9.2j&&""!==a.9.2j?a.3W():e.5x()},1x.3N=B(){a.3N()},1x.aw=B(b){b&&(a.9.20=b),a.3N()},1x.b9=B(b){b&&(a.9.2j=b),a.3N()},1x.cu=B(a){E b=1t(a),c=f.5V;T a&&"7H"===c&&(b=b.1R(/\\-/g,"+"),b=b.1R(/\\7G/g,"=")),b},1x.4U=B(b){a.4U(b)},1x.5p=B(b,c){a.9={},a.G&&H.I("1x.5p, 7A = "+c),c&&(a.2O=c);1A{a.9=1a.3V(b)}1u(f){a.9=1w.7z(a.9,b)}K(a.G&&H.I("1x.5p: $25.9 = "+1a.1k(a.9)),(1K 0===a.9.1Z||1m===a.9.1Z)&&(a.9.1Z=!0),a.9.1N&&a.9.1P&&a.9.1r&&a.9.W&&a.9.1i&&a.9.1Z)1A{K(!a.2u){a.2u=k.4P().N();E g=18.3f(a.9.W+a.9.1i+a.2u).N();a.9.1N=18.28.3J(a.9.1N,g).N(),a.9.1P=18.28.3J(a.9.1P,g).N(),a.9.1r=18.28.3J(a.9.1r,g).N()}}1u(f){i.1q({1z:a.1h.5t})}1l a.9.53="5a "+d.2v(a.9.1N+":"+a.9.1P);e.6e()},a.27=B(b){E c=b,d=f.5V;a.G&&H.I("27 5V Z:"+1a.1k(d,1m,"")),a.G&&H.I("27: \\7Z: "+c),a.4W?(a.4W(b),a.G&&H.I("$25.27, $25.4W 35 = "+b)):("7H"===d&&(c=b.1R(/\\+/g,"-"),c=c.1R(/\\=/g,"7G")),a.9.6o&&(c=a.9.6o+c,a.G&&H.I("27: \\cn: "+c)),1x.3M=c)},a.6T=B(){a.3k(),b.2L("/3d").1R()},a.4X||a.3k()}]),1w.29("2a").1y("cF",B(){}),1w.29("2a").1y("63",["$2r","$25","$3M","$7s","5Y","7E",B(a,b,c,d,e,f){a.8k=B(){E a=!1;T b.9.2M&&b.9.1e&&"1"===1t(b.9.2M)&&(b.9.4c||(a=!0)),a},a.8y=B(){K(!b.9.1e){E c=d.3c({3b:!0,2x:"1B/7I.1C",1y:"8c",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.6Y=B(){K(b.9.30){E c=d.3c({3b:!0,2x:"1B/7D.1C",1y:"8C",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.8O=B(){K(b.9.1e){E c=d.3c({3b:!0,2x:"1B/80.1C",1y:"8a",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.8U=B(){K(b.9.1e){E c=d.3c({3b:!0,2x:"1B/7l.1C",1y:"8W",3s:"",3i:{2r:B(){T a}}});c.1v.2q(B(){},B(){})}},a.89=B(){E a=!1,c={};K(c.5i="1I 3j 5A",c.1G="",b.9.1F)K(0===b.9.1F.P)a=!0,c.1G="1I 2D 2t";1l K(b.9.1H)K(0===b.9.1H.P)a=!0,c.1G="1I 2D 6t";1l K(b.9.1J)K(0===b.9.1J.P)a=!0,c.1G="1I 2D 24";1l K("3O"===b.9.1j)a=!0,c.1G="3u 3I a 3j 1D";1l K("2B"===b.9.1j||"6y"===b.9.1j)K(!b.9.33||b.9.33.P<16)a=!0,c.1G="1I 2B 2N 2S";1l K(!f.4T(b.9.33)&&b.9.1e)a=!0,c.1G="1I 2B 2N 2S (cG)";1l K(!b.9.21||b.9.21.P<3)a=!0,c.1G="1I 4M 2S";1l K(!b.9.1Q||b.9.1Q.P<5)a=!0,c.1G="1I 4s 6c";1l K(b.9.2F){K(b.9.32&&b.9.32.P>0&&(a=e.5N(b.9.33)))T}1l a=!0,c.1G="1I 7L 2t";1l"4v"===b.9.1j&&(!b.9.2f||b.9.2f.P<10?(a=!0,c.1G="1I 7p 2S"):b.9.3L||(a=!0,c.1G="1I 7p 8b"));1l a=!0,c.1G="1I 2D 24";1l a=!0,c.1G="1I 2D 6t";1l a=!0,c.1G="1I 2D 2t";K(a){E g=d.3c({3b:!0,2x:"1B/5d.1C",1y:"5f",3s:"14",3i:{3m:B(){T c}}});g.1v.2q(B(){},B(){})}1l e.70(),b.3a("2z","cE",b.9.1j.N())}}]),1w.29("2a").1y("7n",["$2r","$25",B(a,b){a.4V={},a.4V.4r={cI:2,bX:60,bW:10,c0:!1,bV:"bU",bR:"2m",c3:12,cb:"",c9:"#c8"},a.73=b.5Z(b.1c.1D)}]),1w.29("2a").5D("5Y",["4t","$7u","$25","$7t","5T","5E","$3M","5S","$7s","$1V",B(a,b,c,d,e,f,g,h,i,j){E k={};T c.3a=B(a,d,e){K(c.9.4O){c.G&&H.I("3B, c7 = "+a+", c6 = "+d+", c4 = "+e);E f="v=1",g="&c5=ca-ch-7",i=c.9.5X;1x.4Q&&!i?(i=1x.4Q.ci("7X"),i?c.G&&H.I("3B, cg 7W 1U, cf 4j = "+i):(i=h.4P().N(),1x.4Q.cc("7X",i),c.G&&H.I("3B, 7W 2h 1U, 3r 4j 85 = "+i))):i||(i=h.4P().N(),c.9.5X=i,c.G&&H.I("3B, 4Q 2h ce, 3r 4j 85 = "+i));E j="&c2="+i,k="&83=bS";c.9.W&&(k="&83="+c.9.W.N());E l="&t=bT",m="&bQ=%bO",n="&bP=7N",o="&cd=7N",p="&an="+c.9.4R.N(),q="&7O=4g-24-67-38";c.9.1i&&(q="&7O="+c.9.1i.N());E r="&av="+c.9.3E.N(),s="&c1="+a.N(),t="&bZ="+d.N(),u="&bY="+e.N(),v="68://38.ck-cj.6j/cH?"+f+g+j+k+l+m+n+o+p+q+r+s+t+u,w={5b:"4H",35:v};b(w).2q(B(a){c.G&&H.I("3B, 6Q 6P cC, 6O = "+1a.1k(a))},B(a){c.G&&H.I("3B, 6Q 6P 4z, 6O = "+1a.1k(a))})}},k.3x=B(a){T 18.3x(a).N()},k.2J=B(a){T 18.2J(a).N()},k.1Y=B(a,b){T"cD="+a+"&cq="+1a.1k(b,1m,"")},k.2C=B(d,e){c.3e=!0;E g=c.9.53;K(c.9.1Z){E h=18.3f(c.9.W+c.9.1i+c.2u).N();g="5a "+a.2v(18.28.2V(c.9.1N.N(),h).N(18.2Z.34)+":"+18.28.2V(c.9.1P.N(),h).N(18.2Z.34))}E i={5b:"4H",35:d,5o:{5y:"3F/3C",8o:g,"5z-3y":"3F/x-38-S-5K","5J-3y":"3C","8w-8v":c.9.3E},1L:e};b(i).2q(B(a){K(c.3e=!1,a.1L.2s)c.G&&H.I("1X 8q 5O 1L 5F 2s:"+a.1L.2s),f.4G(d,a.1L.1v);1l K("cr"===a.6H){K(c.G&&H.I("1X cs: \\n"+1a.1k(a.1L,1m,"")),a.1L.2s===!1)31(a.1L.1v.cp){2Q co:2Q cl:c.G&&H.I(c.1h.4Z),f.1q({1z:c.1h.4Z}),c.2O&&c.2O(!1,c.1h.4Z);3g;2Q cm:c.9.1e=!0}(d===c.36||d===c.3X)&&f.4G(d,a.1L)}1l c.G&&H.I("aD 4H 6a 4z: "+a.6H)},B(){c.3e=!1,c.G&&H.I(c.1h.57),f.1q({1z:c.1h.57}),c.2O&&c.2O(!1,c.1h.57)})},k.ct=B(a){c.3e=!0;E d={5b:"cA",35:a,5o:{5y:"3F/3C","5z-3y":"3F/x-38-S-5K","5J-3y":"3C"}};b(d).2q(B(){c.3e=!1},B(){c.3e=!1,c.G&&H.I("cB cz cy")})},k.3v=B(){E a=c.9.1r;K(c.9.1Z){E b=18.3f(c.9.W+c.9.1i+c.2u).N();a=18.28.2V(c.9.1r.N(),b).N(18.2Z.34)}c.G&&H.I("(1d 1) 54:"+a);E d=k.3x(a).N(),e=c.9.W+c.9.1i+d;c.G&&H.I("(1d 2) cv + cw + cx(54):"+e);E f=k.2J(e).N();T c.G&&H.I("(1d 3) 2J(bM 3K 1d 2):"+f),f},k.5r=B(a){E b=c.9.1r;K(c.9.1Z){E d=18.3f(c.9.W+c.9.1i+c.2u).N();b=18.28.2V(c.9.1r.N(),d).N(18.2Z.34)}E e=c.9.1s,f=c.9.W,g=c.9.20,h=b,i=a,j=k.3x(e+f+g+h+i).N();T j},k.8F=B(){E a=c.9.1r;K(c.9.1Z){E b=18.3f(c.9.W+c.9.1i+c.2u).N();a=18.28.2V(c.9.1r.N(),b).N(18.2Z.34)}E d=c.9.1s,e=c.9.W,f=c.9.2j,g=a,h="4C",i=k.3x(e+h+f+d+g).N();T i},k.5w=B(){E a=c.9.1r;K(c.9.1Z){E b=18.3f(c.9.W+c.9.1i+c.2u).N();a=18.28.2V(c.9.1r.N(),b).N(18.2Z.34)}E d=c.9.1s,e=c.9.W,f=c.9.20,g=a,h="4D",i=e+h+f+d+g;c.G&&H.I("5w b1:"+i);E j=k.3x(i).N();T j},c.b0=B(a){E b=c.6f,d=c.9.W+a+c.9.39,e=d+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+e);E f=k.2J(e).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+f);E g={4N:c.9.W,aZ:a+c.9.39},h=k.1Y(f,g);c.G&&H.I("(1d 6) 2P 1Y:"+h),k.2C(b,h)},k.6e=B(){E a=c.4F,b=c.9.W+c.9.2d,d=b+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+d);E e=k.2J(d).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+e);E f={4N:c.9.W,7a:c.9.2d},g=k.1Y(e,f);c.G&&H.I("(1d 6) 2P 1Y:"+g),k.2C(a,g)},k.72=B(){E a=c.4A,b=c.9.W,d=b+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+d);E e=k.2J(d).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+e);E f={4N:c.9.W},g=k.1Y(e,f);c.G&&H.I("(1d 6) 2P 1Y:"+g),k.2C(a,g)},k.5Q=B(){E a="aX",b=c.9.2M,d=c.4B,e=6Z("+"),f=1t(c.9.1J).5P("+",e),g=c.9.W+c.9.1F+c.9.1H+c.9.1J+c.9.1i+a+b,h=g;c.G&&H.I("(1d 4) 3P 46:"+h);E i=k.2J(h).N(),j=i+k.3v();c.G&&H.I("(1d 5) 41(1v 3K 1d 4) + 4a 3w:"+j);E l={3U:c.9.W,6p:c.9.1F,5q:c.9.1H,5l:f,5m:c.9.1i,3T:a,1V:b},m=k.1Y(j,l);c.G&&H.I("(1d 6) 2P 1Y:"+m),k.2C(d,m)},k.79=B(){k.6e(),k.72(),c.9.1F&&c.9.1H&&c.9.1J&&k.5Q()},k.70=B(){c.2b="6r";E a=c.2b,b=c.36,d=6Z("+"),e=1t(c.9.1J).5P("+",d),f={4q:c.9.1s,5m:c.9.1i,8R:c.9.2i,5q:c.9.1H,5l:e,6p:c.9.1F,1D:c.9.1j,5R:c.9.2d,3D:c.9.3D,3U:c.9.W,3T:a,8N:c.9.20,58:c.9.58,4h:c.9.2p,54:k.5r(a),2f:c.9.2f,1V:c.9.2M,aY:c.9.59};"2B"===c.9.1j||"6y"===c.9.1j?(f.4M=c.9.21,f.3Q=c.9.3Q,f.3Y=c.9.3Y,f.b3=c.9.2F,!c.9.1e&&c.9.2H?f.2H=c.9.2H:f.b4=c.9.33):"4v"===c.9.1j&&(f.2f=c.9.2f,f.3L=c.9.3L),c.3S&&(f.3S=c.3S),c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(f,1m,"")),g.2L("/2R").1R(),k.2C(b,f)},k.8V=B(){E a=c.3X,b="";c.G&&H.I("bN 8Q 5O 35:"+a),k.2C(a,b)},c.3W=B(){c.2b="4C";E a=c.2b,b=c.36,d={3U:c.9.W,69:c.9.2j,4q:c.9.1s,4b:k.8F(),3T:a};c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(d,1m,"")),g.2L("/2R").1R(),k.2C(b,d)},k.5x=B(){c.2b="4D";E a=c.2b,b=c.36,d={3U:c.9.W,b8:c.9.20,4q:c.9.1s,4b:k.5w(),3T:a};c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(d,1m,"")),g.2L("/2R").1R(),k.2C(b,d)},k.b5=B(){c.2b="7y";E a=c.2b,b=c.36,d={4q:c.9.1s,8N:c.9.20,4h:c.9.2p,5R:c.9.2d,3U:c.9.W,54:k.5r(a),1D:"b6",6p:c.9.1F,5q:c.9.1H,5l:c.9.1J,5m:c.9.1i,8R:c.9.2i,3D:c.9.3D,3T:a};c.G&&H.I("(1d 6) 2P 1Y:"+1a.1k(d,1m,"")),g.2L("/2R").1R(),k.2C(b,d)},k.8X=B(d){E e=d;K(c.G&&H.I("3A 44, 5H ="+e),e){c.9.4c=!1,c.9.4e=!0;E f=c.5k,g=c.9.W+e,h=g+k.3v();c.G&&H.I("(1d 4) 3P 46 + 4a 3w:"+h);E j=k.2J(h).N();c.G&&H.I("(1d 5) 41(1v 3K 1d 4):"+j);E l={4N:c.9.W,3A:e},m=k.1Y(j,l);c.G&&H.I("(1d 6) 2P 1Y:"+m);E n=c.9.53;c.9.1Z&&(n="5a "+a.2v(18.28.2V(c.9.1N.N(),c.9.W+c.9.1i).N(18.2Z.34)+":"+18.28.2V(c.9.1P.N(),c.9.W+c.9.1i).N(18.2Z.34)));E o={5b:"4H",35:f,5o:{5y:"3F/3C",8o:n,"5z-3y":"3F/x-38-S-5K","5J-3y":"3C","8w-8v":c.9.3E},1L:m};b(o).2q(B(a){K(c.9.4e=!1,a.1L.2s&&(c.G&&H.I("1X 8q 5O 1L 5F 2s:"+a.1L.2s),8r(a.1L.2s)&&(c.9.4c=8r(a.1L.1v.2s),!c.9.4c))){E b={};b.5i="1I 3j 5A",b.1G="1I aL 2N 2S";E d=i.3c({3b:!0,2x:"1B/5d.1C",1y:"5f",3s:"14",3i:{3m:B(){T b}}});d.1v.2q(B(){},B(){c.9.2e=""})}},B(){c.9.4e=!1})}},k.5N=B(a){E b=!1,d=a;K(c.G&&H.I("3A 4x 44, 5H ="+d),d){d.P>5&&(d=a.1b(0,6),c.G&&H.I("3A 4x 44, 5H ="+d)),c.G&&H.I("3A 4x 44, 32 =",c.9.32);E e=j("1V")(c.9.32,d,!0);K(c.G&&H.I("3A 4x 44, 1U =",e),0===e.P){E f={};f.5i="1I 3j 5A",f.1G=c.9.8e;E g=i.3c({3b:!0,2x:"1B/5d.1C",1y:"5f",3s:"14",3i:{3m:B(){T f}}});T g.1v.2q(B(){},B(){c.9.1e&&(c.9.2e="")}),b=!0}}T b},k}]),1w.29("2a").5D("5E",["$25","4t","$3M","$1V",B(a,b,c,d){E e={};T e.6w=B(b){K(b){a.9.2w=b,a.2O&&a.9.2w.P>0&&a.2O(!0);E c="";a.5G()&&(c=d("1V")(a.9.2w,{5g:"2B"},!0),c.P&&(a.G&&H.I("1U 5F aN = "+c),a.9.2w.aO(c.2c,1))),0===a.9.2w.P&&(a.G&&H.I(a.1h.4y),e.1q({1z:a.1h.4y}),a.2O&&a.2O(!1,a.1h.4y)),"3O"!==a.9.1j?(c=d("1V")(a.9.2w,{5g:a.9.1j},!0),c.P?a.9.2T=c[0].5C:(a.9.1j="3O",a.9.2T="(3u 3I a 1D)")):(a.9.1j="3O",a.9.2T="(3u 3I a 1D)"),("3t"===a.9.1O||a.9.2j)&&a.3W()}a.G&&H.I("6w: \\2I: "+1a.1k(a.9.2w,1m,"")),a.3a("7K","7M","bc")},e.6x=B(b){b&&(a.9.22=b,a.9.22.P>0?a.9.1e=!1:a.9.1e=!0),a.G&&H.I("6x: \\2I: "+1a.1k(a.9.22,1m,""))},e.6u=B(b){b&&(a.9.5h=b),a.G&&H.I("6u: \\2I: "+1a.1k(a.9.5h,1m,""))},e.48=B(c){K(a.G&&H.I("48: \\2I: "+c),c&&c.P>0){E d=b.2v(c);a.G&&H.I("3Z: \\40: "+d);E f=a.7i+d;a.27(f),a.3a("2z","6r","bd")}1l{a.G&&H.I("48: \\bB 1v: "+1a.1k(c));1A{E g=1m;1A{g=1a.3V(c)}1u(h){g=c}K(a.G&&H.I("48: \\bA: "+g),g.8t&&g.6v&&g.6v.P>0){E i=g.8t+", "+g.6v;e.1q({1z:i})}}1u(h){e.1q({1z:a.1h.8A})}}},e.6A=B(b){a.3p=b,a.G&&H.I("6A: \\2I: "+1a.1k(a.3p,1m,"")),a.3p&&""!==a.3p&&(a.9.2j=a.3p.bw,a.9.4b=a.3p.4b,a.3W())},e.6C=B(d){a.1c=d,a.1c.6q&&1===a.1c.6q&&(a.1c.1O="3t"),a.9.1O&&(a.1c.1O=a.9.1O,"3t"===a.1c.1O&&a.1c&&a.1c.3H&&"11"===a.1c.3H&&(a.G&&H.I("3t 2s 4z, by bD bE"),a.1c.1O="")),a.G&&H.I("6C: \\2I: "+1a.1k(a.1c,1m,""));E e=b.2v(1a.1k(a.1c,1m,""));a.G&&H.I("3Z: \\40: "+e);E f=a.42+e;a.27(f),("3t"===a.9.1O||1===a.1c.6q)&&a.1c&&a.1c.3H&&"11"!==a.1c.3H&&c.2L("/3q").1R();E g=a.1c.3H;g||(g="77"),a.3a("74","4C",g.N())},e.6B=B(c){a.49=c,a.9.1O&&(a.49.1O=a.9.1O),a.G&&H.I("6B: \\2I: "+1a.1k(a.49,1m,""));E d=b.2v(1a.1k(a.49,1m,""));a.G&&H.I("3Z: \\40: "+d);E e=a.42+d;a.27(e);E f=a.49.3H;f||(f="77"),a.3a("74","4D",f.N())},e.6D=B(c){a.6s=c,a.G&&H.I("6D: \\2I: "+1a.1k(a.6s,1m,""));E d=b.2v(1a.1k(a.6s,1m,""));a.G&&H.I("3Z: \\40: "+d);E e=a.42+d;a.27(e)},e.1q=B(d){E e=d;e.71=a.9.71,c.2L("/2R").1R(),a.G&&H.I("1q: \\2I: "+1a.1k(d,1m,""));E f=b.2v(1a.1k(d,1m,""));a.G&&H.I("3Z: \\40: "+f);E g=a.42+f;a.27(g),a.3a("7K","7M","bv")},e.4G=B(b,c){31(a.G&&H.I("4G: \\7Z: "+b),b){2Q a.4F:e.6w(c);3g;2Q a.4B:e.6x(c);3g;2Q a.4A:e.6u(c);3g;2Q a.bu:e.bj(c);3g;2Q a.36:"6r"===a.2b?e.48(c):"4C"===a.2b?e.6C(c):"4D"===a.2b?e.6B(c):"7y"===a.2b&&e.6D(c);3g;2Q a.3X:e.6A(c);3g;be:a.G&&H.I("bl bm\'t bs a bt")}},e}]),1w.29("2a").1y("8n",B(){}),1w.29("2a").1y("8C",["$2r","$47","$25",B(a,b,c){a.7B=B(a){c.9.1j=a.5g,c.9.2T=a.5C,"4v"===c.9.1j?c.8J():c.9.1O="",b.2G()},a.1W=B(){b.2G()}}]),1w.29("2a").1y("8W",["$25","$2r","$47",B(a,b,c){b.7Y=B(b){a.9.2F=b.2t,c.2G()},b.1W=B(){c.2G()}}]),1w.29("2a").1y("8a",["$2r","88","$25","$47",B(a,b,c,d){a.8j=b.5B(),a.8m=B(a){c.9.2k=a[0],d.2G()},a.1W=B(){d.2G()}}]),1w.29("2a").1y("5f",["$2r","$47","3m",B(a,b,c){a.3m=c,a.1W=B(){b.2G()}}]),1w.29("2a").1y("8c",["$2r","$47","$25",B(a,b,c){a.7r=B(a){c.9.1p=a,b.2G()},a.1W=B(){b.2G()}}]),1w.29("2a").8L(["$bo",B(a){a.2K("1B/5d.1C",\' <6F>{{3m.5i}} <86>{{3m.1G}} <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/7l.1C",\' {{ O.2t }} <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/7I.1C",\' {{ O.65 }} ****** {{ O.64 }} {{ O.bp }} <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/7D.1C",\' {{ O.5C }} <4m y="1D-76" F-5s="{{ O.6L }}"> <1f y="1W-1f" Z="1f" F-1g="1W()">5j \'),a.2K("1B/80.1C",\' {{ O[1] }} <1f y="1W-1f" Z="1f" F-1g="1W()">bn \'),a.2K("1B/2R.1C",\'

br 3j 2s.

3u bg.

\'),a.2K("1B/bf.1C",\'

<8K>1S X-bh

1r 2i 20 1N 1F 2p 2d W 1H 1J 1i 1P 1s 4o 1j <1f F-1g="6T()">7j \'),a.2K("1B/3d.1C",\' bG 4j {{9.20}} {{9.2d}} {{9.1s}} &2g; &2g; &2g; &2g; 7j bI &2g; {{9.2T}} bL 2N <4k-31 F-19="9.1e" y="3r-2B-2N-31" 4J-J="bK" bx-J="8i"><4k-31> 8B 2S &2g; 8p &2g; 8G 6c &2g; aQ &2g; {{9.4i}} 8f 2t &2g; {{9.2F}} {{9.8E}} aR 8x aT (aS = 4l 8x aM) {{9.5M}} 8B# aG 43 &2g; aH &2g; <1f F-1g="89()" y="8g-1f" F-aI="8k()">&2g;aU <4m F-5s="aV/8M.b7" y="8M"> V{{9.3E}} \'),a.2K("1B/3q.1C",\' <4m y="3q-76" F-5s="{{ 73 }}"> aW 1S {{1c.1D}} b2 4j {{1c.69}} <3o Z="6R" 81="4m" 62="{{1c.69}}" 4r="4V.4r"> {{1c.6I}} {{1c.7C}} <3o Z="6R" 81="4m" 62="{{1c.7C}}" 4r="4V.4r"> 9z 4q {{1c.5R}}{{1c.a9}} aa <7P y="D-M-O 1o-D-M-O 6g" F-4f="O 4d 1c.6g"> {{ O }} \')}]);',62,789,'|||||||||sdkData|||||||||||||||||||||||||class|div||function|span|list|var|ng|isInternalDebugging|console|log|label|if|value|group|toString|item|length|right|fa|form|return|pull||mp_merchant_ID||input|type||||text|sm|control||col|CryptoJS|model|JSON|substring|C5ResultData|Step|new_credit_card|button|click|sdkConstants|mp_app_name|mp_channel|stringify|else|null|left|modal|current_token|commErrorHandler|mp_verification_key|mp_amount|String|catch|result|angular|window|controller|Error|try|views|html|channel|show|mp_bill_name|errorDesc|mp_bill_email|Invalid|mp_bill_mobile|void|data|MPdomain|mp_username|mp_request_type|mp_password|mp_credit_card_expiry|replace|MOLPay|mp_editing_enabled|found|filter|close|API|Payload|mp_encrypt_credentials|mp_order_ID|mp_credit_card_cvv|available_token|placeholder|mobile|rootScope|php|callNativeWebview|AES|module|molpayXsdkApp|CurrentMsgType|index|mp_currency|mp_credit_card_no_display|bcard_no|nbsp|not|mp_bill_description|mp_transaction_id|mp_credit_card_country|body|center|search|trim|mp_country|then|scope|status|name|seed|encode|available_channel|templateUrl|circle|Payment|times|credit|HttpPost|billing|lg|mp_credit_card_bank|dismiss|token|nresult|SHA1|put|path|mp_filter|card|testMerchantCredentialsCallback|The|case|finalizingpayment|number|mp_channel_title|opt|decrypt|mod|InternalUsed|requestPath|enc|mp_channel_editing|switch|mp_bin_lock|mp_credit_card_no|Utf8|url|MobileNewApiUrl|hide|www|device_info|GaTrackEvent|animation|open|paymentinfo|isLoading|SHA256|break|container|resolve|payment|updateSdkData|watch|alertdata|MY|barcode|B4ResultData|receipt|new|size|Receipt|Please|PasswordHash|password|MD5|Type|aligned|BIN|gaTrackEvent|json|l_version|sdk_version|application|readonly|status_code|select|encrypt|of|bcard_pin|location|transactionRequest|multi|all|month|document|in_app_mode|msgType|merchant_id|parse|ApiC5|B4ResultUrl|year|htmlStringBase64|nhtmlStringBase64|sha1|nativeWebTransactionResults||Check|indexOf|variables|uibModalInstance|B3Handler|D7ResultData|checksum|chksum|bin_checked|in|bin_checking_in_progress|repeat|molpay|country|mp_credit_card_country_title|ID|toggle|100|img|tel|mp_debug_mode|footer|amount|options|exp|base64|please|pointbcard|chevron|Lock|NoChannelFoundCheckCurrencyValue|failed|GetBankListUrl|T1Url|C5|D7|controllerAs|GetAvailableChannelByIdUrl|OnApiResponseReceived|POST|xxxx|on|Billing|billinginfo|cvv|merchantID|mp_ga_enabled|generate|localStorage|module_id|setTimeout|check|addCustomCSS|vm|inAppCallback|isDeploy|cdomain|AccessDeniedMidAppnameVerificationkey|expdate|when|mp_preferred_token|authData|vcode|searchString|wrapper_version|CommunicationError|token_status|mp_is_escrow|Basic|method|marginless|alertmodal|listgroup|AlertModalCtrl|maskname|available_banklist|errorTitle|CLOSE|IsDebitCardUrl|bill_mobile|app_name|row|headers|testMerchantCredentials|bill_email|VcodeHash|src|SecuredEncryptionFailed|icon|Android|ChecksumForD7|ApiD7|Accept|Content|information|getCountries|title|factory|ApiHandlerService|and|isBelowAndroid44|binValue|bcard|Data|urlencoded|closemolpay|bcard_point|BinLockCheck|with|replaceAll|ApiT1|cur|uuid4|deviceDetector|molpayResultString|device|header|mp_ga_userid|AuthenticationService|getChannelLogoFromChannelName||nativeWebCloseAllWindows|string|PaymentInfoCtrl|bin4|bin|nativeWebRunScriptOnPopup|xdk|https|txn_ID|request|bar|date|AmountNotFound|ApiGetAvailableChannelById|PaymentRecordsLogUrl|notes|Malaysia|domain_mode|com|isStarting|css|mp_custom_css_url|app|webview_url_prefix|bill_name|pInstruction|B3|E9ResultData|email|GetBankListHandler|error_message|GetAvailableChannelByIdHandler|T1Handler|credit3|split|B4Handler|D7Handler|C5Handler|E9Handler|coreVersion|h4|block|statusText|pcode_lbl|checkIfThisIsAValidCountryCode|InvalidCountryCode|logo_url|VerificationKeyNotFound|Search|response|beam|ga|code128c|CountryNotFound|onPayClicked|mp_is_secure|getElementById|element|display|onChannelListClicked|encodeURIComponent|ApiB3|mp_transaction_request_type|ApiGetBankList|toplogourl|PaymentStatus|onBillingInfoChanged|logo|unknown|getChannelMasknameFromChannelName|PreloadData|currency|PasswordNotFound|MerchantIdNotFound|AppNameNotFound|OrderIdNotFound|MPSecondaryDomain|UsernameNotFound|toFixed|nativeWebOpenMOLPayWindow|Pay|CurrencyNotFound|banklistmodal|resultform|ReceiptCtrl|Run|BCard|hlbFailedString|onCardSelected|uibModal|timeout|http|hlbSuccessString|script|popup|E9|extend|callback|onChannelSelected|pcode|channelmodal|luhn|closeAll|_|iphone|cardlistmodal|maybankSuccessString|Main|bank|PaymentInfo|MOLPayPayment|aid|li|timeoutHttpIntercept|recordsLog|GetAvailableChannelById|GetBankList|IsDebitCard|mobile_new|gaClientId|mpUserId|onBankSelected|nurl|countrylistmodal|render|chips|uid|TransactionIdForReceiptRequestNotFound|generated|h5|RegExp|Countries|proceedClicked|CountrylistModalCtrl|pin|CardlistModalCtrl|xxx|mp_bin_lock_err_msg|Bank|proceed|issuer_bank|No|countryArray|proceedDisabled|parseInt|onCountrySelected|FinalizingPaymentCtrl|Authorization|CVV|responded|Boolean|larger|error_code|point|Version|SDK|BCARD|onCardNumberClicked|or|UnhandledErrorContactSupport|Card|ChannelModalCtrl|bank_country|credit_disclaimer|ChecksumForC5|Exp|focus|MPMainDomain|updateBCardPoints|h2|run|poweredByMOLPay|orderid|onCountrylistClicked|MM|B4|bill_desc|disclaimer|createTextRange|onBanklistClicked|ApiB4|BanklistModalCtrl|IsDebitCardCheck|verification|returned|B2C_paymentProcessed|change|Communication|internet|nativeWebRequestUrlUpdatesOnFinishLoad|connection|key|B2C_paymentFailed|link|Maybank2U|unescape|assign|success|mprunscriptonpopup|parameters|maha|nativeWebRequestUrlUpdates|interceptors|denied|submit|routeProvider|redirectTo|config|otherwise|Access|use|merchant|username|m2uTicketsPaymentConfirmed|id|1e4|mptransactionresults|httpProvider|do|HLB|Payable|_self|target|Online|creditCardInput|nativeWebClosePopupAndRunScriptOnMOLPayWindow|mpopenmolpaywindow|setCaretPosition|countries|mpopenpopup|move|typeof|ngRoute|leodido|ngSanitize|gi|userAgent|raw|directive|isString|nativeWebOpenPopup|injector|setSelectionRange|add|fileUrl|strict|my|selectionStart|pay|isNumber|parseFloat|exec|character|apply|ngTouch|error|payable_amt|Note||onlinepayment|support|contact|mpclosepopupandrunscriptonmolpaywindow|Status|Unhandled|enableInAppMode|restrict|push|getDeviceInfo|Secured||mpcloseallwindows|MYR|this|mp_url_scheme|mp_authData|ui|prototype||transactionRequestWithOrderId|cssInjector|encryption|FastClick|attach|bootstrap|for|Http|digit|Last|6298|Pin|disabled|spin|spinner|debit|Points|removed|splice|YYYY|Country|Use|RM1|points|PROCEED|images|Services|T1|is_escrow|message|ApiRecordsLog|checksumString|Transaction|bank_name|cardnumber|ApiE9|MOLWallet|png|order_ID|transactionRequestWithTransactionId|version|mp|Initiate|Success|default|main|wait|Platform|horizontal|GenBarcodeHandler|checkbox|Response|doesn|Close|templateCache|debit_credit|vertical|Finalizing|have|handler|ApiGenBarcode|CommError|tranID|off|just|YY|nerrorResult|nJSON|cvc|send|results|description|Order|offset|through|creditcard|Yes|New|Result|Get|2Fpaymentinfo|dt|dp|textAlign|none|event|monospace|font|quite|height|el|ea|displayValue|ec|cid|fontSize|eLabel|tid|eAction|eCategory|000|lineColor|UA|backgroundColor|setItem||available|reuse|existing|29894240|getItem|analytics|google|1002|1003|nwebview_url_prefix|1001|code|Params|OK|Returned|HttpGet|convertSafeBase64StringBackToOriginalVersion|mID|appName|md5|Sent|Not|GET|Request|sent|Checksum|Proceed|MainCtrl|LUHN|collect|width'.split('|'),0,{})) diff --git a/MOLPayXDKExample/platforms/ios/www/plugins/molpay-mobile-xdk-cordova/molpay.js b/MOLPayXDKExample/platforms/ios/www/plugins/molpay-mobile-xdk-cordova/molpay.js index c7a2cff..8592df9 100644 --- a/MOLPayXDKExample/platforms/ios/www/plugins/molpay-mobile-xdk-cordova/molpay.js +++ b/MOLPayXDKExample/platforms/ios/www/plugins/molpay-mobile-xdk-cordova/molpay.js @@ -1,3 +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://",molpayresulturl="https://www.onlinepayment.com.my/MOLPay/result.php",molpaynbepayurl="https://www.onlinepayment.com.my/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){isInternalDebugging&&console.log("postMolpayResultHandler innHtml = "+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),isInternalDebugging&&console.log("innHtmlString = "+b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(isInternalDebugging&&console.log("onMolpayUiFrameLoad B4 results = "+b),g=JSON.parse(b))){var h=g.tranID;h&&(isInternalDebugging&&console.log("mainUiFrame.contentWindow.transactionRequestWithTransactionId = "+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){isInternalDebugging&&console.log("onBankUiLoadstop event.url ="+a.url);var b;b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpaynbepayurl found"),bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){isInternalDebugging&&console.log("bankUiWindow window.open to window.location inject ok")}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){isInternalDebugging&&console.log("bankUiWindow window.close to window.location.assign inject ok")}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){isInternalDebugging&&console.log("onBankUiLoadstart event.url = "+a.url);var b;if(b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstart molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b),postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)){isInternalDebugging&&console.log("onBankUiLoadstart molpaynbepayurl found");var c=10,f=0,g=setInterval(function(){h()},1e3),h=function(){f++,f>c?clearInterval(g):bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b);var c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(g))})}}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){var b,c;if(a&&a.indexOf(mpopenmolpaywindow)>-1)c=new RegExp(mpopenmolpaywindow,"g"),b=a.replace(c,""),b&&b.length>0&&(isInternalDebugging&&console.log("inAppCallback base64HtmlString = ",b),createBankUiWindow(b));else if(a&&a.indexOf(mptransactionresults)>-1&&(c=new RegExp(mptransactionresults,"g"),b=a.replace(c,""),b&&b.length>0)){var d=window.atob(b),e=JSON.stringify(JSON.parse(d));transactionResultCallback(e),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(c=new RegExp(mprunscriptonpopup,"g"),b=a.replace(c,""),b&&b.length>0)){var f=window.atob(b);isInternalDebugging&&console.log("run script on popup, script ="+f),bankUiWindow.executeScript({code:f},function(a){isInternalDebugging&&console.log("run script on popup ok")})}},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isInternalDebugging&&console.log("MOLPay startmolpay paymentdetails = "+JSON.stringify(a,null,"")),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(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){isInternalDebugging&&console.log("MOLPay transactionRequest paymentdetails = "+JSON.stringify(a,null,""));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(){isClosingMolpay=!0,mainUiFrame.contentWindow.transactionRequest()};var molpay=new MOLPay;module.exports=molpay; +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://",molpayresulturl="https://www.onlinepayment.com.my/MOLPay/result.php",molpaynbepayurl="https://www.onlinepayment.com.my/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){isInternalDebugging&&console.log("postMolpayResultHandler innHtml = "+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),isInternalDebugging&&console.log("innHtmlString = "+b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(isInternalDebugging&&console.log("onMolpayUiFrameLoad B4 results = "+b),g=JSON.parse(b))){var h=g.tranID;h&&(isInternalDebugging&&console.log("mainUiFrame.contentWindow.transactionRequestWithTransactionId = "+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){isInternalDebugging&&console.log("onBankUiLoadstop event.url ="+a.url),mainUiFrame.contentWindow.nativeWebRequestUrlUpdatesOnFinishLoad({requestPath:a.url});var b;b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpaynbepayurl found"),bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){isInternalDebugging&&console.log("bankUiWindow window.open to window.location inject ok")}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){isInternalDebugging&&console.log("bankUiWindow window.close to window.location.assign inject ok")}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){isInternalDebugging&&console.log("onBankUiLoadstart event.url = "+a.url);var b;if(b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstart molpayresulturl found"),mainUiFrame.contentWindow.nativeWebRequestUrlUpdates({requestPath:a.url})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)){isInternalDebugging&&console.log("onBankUiLoadstart molpaynbepayurl found");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];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b);var c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(f))})}}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){var b,c;if(a&&a.indexOf(mpopenmolpaywindow)>-1)c=new RegExp(mpopenmolpaywindow,"g"),b=a.replace(c,""),b&&b.length>0&&(isInternalDebugging&&console.log("inAppCallback base64HtmlString = ",b),createBankUiWindow(b));else if(a&&a.indexOf(mpcloseallwindows)>-1)isInternalDebugging&&console.log("inAppCallback closing bankUiWindow"),bankUiWindow.close();else if(a&&a.indexOf(mptransactionresults)>-1&&(c=new RegExp(mptransactionresults,"g"),b=a.replace(c,""),b&&b.length>0)){var d=window.atob(b),e=JSON.stringify(JSON.parse(d));transactionResultCallback(e),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(c=new RegExp(mprunscriptonpopup,"g"),b=a.replace(c,""),b&&b.length>0)){var f=window.atob(b);isInternalDebugging&&console.log("run script on popup, script ="+f),bankUiWindow.executeScript({code:f},function(a){isInternalDebugging&&console.log("run script on popup ok")})}},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isInternalDebugging&&console.log("MOLPay startmolpay paymentdetails = "+JSON.stringify(a,null,"")),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){isInternalDebugging&&console.log("MOLPay transactionRequest paymentdetails = "+JSON.stringify(a,null,""));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(){isClosingMolpay=!0,mainUiFrame.contentWindow.transactionRequest()};var molpay=new MOLPay;module.exports=molpay; }); 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..5efaabb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/config.xml @@ -0,0 +1,29 @@ + + + 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/platforms/android/assets/www/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 similarity index 100% rename from MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/alertmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/alertmodal.html diff --git a/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 similarity index 56% rename from molpay-mobile-xdk-www/views/banklistmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/banklistmodal.html index c575e15..cab8cc3 100644 --- a/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 @@ -1 +1 @@ - \ No newline at end of file + \ 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/platforms/android/assets/www/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 similarity index 100% rename from MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/main.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/main.html 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/platforms/android/assets/www/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 similarity index 100% rename from MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/receipt.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/receipt.html 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/.gradle/2.2.1/taskArtifacts/cache.properties b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/cache.properties new file mode 100644 index 0000000..e855b86 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/cache.properties @@ -0,0 +1 @@ +#Thu Mar 10 11:44:33 MYT 2016 diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/cache.properties.lock b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/cache.properties.lock new file mode 100644 index 0000000..5095462 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/cache.properties.lock differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/fileHashes.bin b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/fileHashes.bin new file mode 100644 index 0000000..5cc5e2f Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/fileHashes.bin differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin new file mode 100644 index 0000000..62d9f2b Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/outputFileStates.bin b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/outputFileStates.bin new file mode 100644 index 0000000..0ec5f90 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/outputFileStates.bin differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin new file mode 100644 index 0000000..5cbff46 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin differ 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..87a4e32 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/AndroidManifest.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + 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..f1c6682 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build.gradle @@ -0,0 +1,61 @@ +/* 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() + } + + dependencies { + classpath 'com.android.tools.build:gradle:1.5.0' + } + +} + +apply plugin: '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/build/generated/source/buildConfig/debug/org/apache/cordova/BuildConfig.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/generated/source/buildConfig/debug/org/apache/cordova/BuildConfig.java new file mode 100644 index 0000000..f2feb90 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/generated/source/buildConfig/debug/org/apache/cordova/BuildConfig.java @@ -0,0 +1,13 @@ +/** + * Automatically generated file. DO NOT MODIFY + */ +package org.apache.cordova; + +public final class BuildConfig { + public static final boolean DEBUG = Boolean.parseBoolean("true"); + public static final String APPLICATION_ID = "org.apache.cordova"; + public static final String BUILD_TYPE = "debug"; + public static final String FLAVOR = ""; + public static final int VERSION_CODE = 1; + public static final String VERSION_NAME = "1.0"; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/bundles/debug/AndroidManifest.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/bundles/debug/AndroidManifest.xml new file mode 100644 index 0000000..90863ed --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/bundles/debug/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/bundles/debug/aapt/AndroidManifest.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/bundles/debug/aapt/AndroidManifest.xml new file mode 100644 index 0000000..90863ed --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/bundles/debug/aapt/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/bundles/debug/classes.jar b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/bundles/debug/classes.jar new file mode 100644 index 0000000..f123139 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/bundles/debug/classes.jar differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/AuthenticationToken.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/AuthenticationToken.class new file mode 100644 index 0000000..e9d5146 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/AuthenticationToken.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/BuildConfig.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/BuildConfig.class new file mode 100644 index 0000000..4c5619f Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/BuildConfig.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CallbackContext.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CallbackContext.class new file mode 100644 index 0000000..420c9f6 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CallbackContext.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/Config.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/Config.class new file mode 100644 index 0000000..173ea3d Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/Config.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ConfigXmlParser.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ConfigXmlParser.class new file mode 100644 index 0000000..f93e441 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ConfigXmlParser.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$1.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$1.class new file mode 100644 index 0000000..b473ba0 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$1.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$2.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$2.class new file mode 100644 index 0000000..781c2fb Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$2.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$3.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$3.class new file mode 100644 index 0000000..8e0600b Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$3.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$4$1.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$4$1.class new file mode 100644 index 0000000..3ce42f1 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$4$1.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$4.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$4.class new file mode 100644 index 0000000..f6a6231 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity$4.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity.class new file mode 100644 index 0000000..1e5cea5 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaActivity.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaArgs.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaArgs.class new file mode 100644 index 0000000..8b2d611 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaArgs.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaBridge.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaBridge.class new file mode 100644 index 0000000..a729b2b Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaBridge.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaClientCertRequest.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaClientCertRequest.class new file mode 100644 index 0000000..46007d4 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaClientCertRequest.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$1.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$1.class new file mode 100644 index 0000000..2c1277c Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$1.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$2.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$2.class new file mode 100644 index 0000000..26b9f39 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$2.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$3.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$3.class new file mode 100644 index 0000000..4b4f630 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$3.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$4.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$4.class new file mode 100644 index 0000000..003a347 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$4.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$5.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$5.class new file mode 100644 index 0000000..6fd19bf Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$5.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$6.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$6.class new file mode 100644 index 0000000..5624455 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$6.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$7.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$7.class new file mode 100644 index 0000000..c252916 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$7.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$8.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$8.class new file mode 100644 index 0000000..1126a35 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$8.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$9.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$9.class new file mode 100644 index 0000000..c6a1762 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$9.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$Result.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$Result.class new file mode 100644 index 0000000..c4dd999 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper$Result.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper.class new file mode 100644 index 0000000..67d736d Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaDialogsHelper.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaHttpAuthHandler.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaHttpAuthHandler.class new file mode 100644 index 0000000..c912f92 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaHttpAuthHandler.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaInterface.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaInterface.class new file mode 100644 index 0000000..b205943 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaInterface.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaInterfaceImpl$ActivityResultHolder.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaInterfaceImpl$ActivityResultHolder.class new file mode 100644 index 0000000..8562638 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaInterfaceImpl$ActivityResultHolder.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaInterfaceImpl.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaInterfaceImpl.class new file mode 100644 index 0000000..2f56fe5 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaInterfaceImpl.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaPlugin.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaPlugin.class new file mode 100644 index 0000000..2d1b720 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaPlugin.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaPreferences.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaPreferences.class new file mode 100644 index 0000000..ed0b3da Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaPreferences.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaResourceApi$OpenForReadResult.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaResourceApi$OpenForReadResult.class new file mode 100644 index 0000000..15ab1f6 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaResourceApi$OpenForReadResult.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaResourceApi.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaResourceApi.class new file mode 100644 index 0000000..19f5911 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaResourceApi.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebView.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebView.class new file mode 100644 index 0000000..feaba8c Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebView.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewEngine$Client.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewEngine$Client.class new file mode 100644 index 0000000..deb6dfd Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewEngine$Client.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewEngine$EngineView.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewEngine$EngineView.class new file mode 100644 index 0000000..1149bf2 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewEngine$EngineView.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewEngine.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewEngine.class new file mode 100644 index 0000000..39e1336 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewEngine.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$1.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$1.class new file mode 100644 index 0000000..4f24ba9 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$1.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$2.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$2.class new file mode 100644 index 0000000..8463ca1 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$2.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$3.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$3.class new file mode 100644 index 0000000..e520dd9 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$3.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$EngineClient$1$1.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$EngineClient$1$1.class new file mode 100644 index 0000000..146cfed Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$EngineClient$1$1.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$EngineClient$1.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$EngineClient$1.class new file mode 100644 index 0000000..b875078 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$EngineClient$1.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$EngineClient.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$EngineClient.class new file mode 100644 index 0000000..705d378 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl$EngineClient.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl.class new file mode 100644 index 0000000..ada59ef Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CordovaWebViewImpl.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$1.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$1.class new file mode 100644 index 0000000..b7e026a Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$1.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$2.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$2.class new file mode 100644 index 0000000..bc6bacf Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$2.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$3.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$3.class new file mode 100644 index 0000000..85ab8ea Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$3.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$4.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$4.class new file mode 100644 index 0000000..7ab6b2c Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$4.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$5.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$5.class new file mode 100644 index 0000000..0ac5611 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid$5.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid.class new file mode 100644 index 0000000..beec67f Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/CoreAndroid.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ExposedJsApi.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ExposedJsApi.class new file mode 100644 index 0000000..6e67520 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ExposedJsApi.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ICordovaClientCertRequest.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ICordovaClientCertRequest.class new file mode 100644 index 0000000..18ad39e Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ICordovaClientCertRequest.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ICordovaCookieManager.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ICordovaCookieManager.class new file mode 100644 index 0000000..142b69c Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ICordovaCookieManager.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ICordovaHttpAuthHandler.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ICordovaHttpAuthHandler.class new file mode 100644 index 0000000..ac03d2d Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ICordovaHttpAuthHandler.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/LOG.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/LOG.class new file mode 100644 index 0000000..55f006d Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/LOG.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$BridgeMode.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$BridgeMode.class new file mode 100644 index 0000000..38bd839 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$BridgeMode.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$JsMessage.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$JsMessage.class new file mode 100644 index 0000000..3ce6e2a Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$JsMessage.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$LoadUrlBridgeMode$1.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$LoadUrlBridgeMode$1.class new file mode 100644 index 0000000..81ff380 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$LoadUrlBridgeMode$1.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$LoadUrlBridgeMode.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$LoadUrlBridgeMode.class new file mode 100644 index 0000000..bad68ff Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$LoadUrlBridgeMode.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$NoOpBridgeMode.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$NoOpBridgeMode.class new file mode 100644 index 0000000..c508806 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$NoOpBridgeMode.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$OnlineEventsBridgeMode$1.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$OnlineEventsBridgeMode$1.class new file mode 100644 index 0000000..18c4a1a Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$OnlineEventsBridgeMode$1.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$OnlineEventsBridgeMode$2.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$OnlineEventsBridgeMode$2.class new file mode 100644 index 0000000..fd50fa8 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$OnlineEventsBridgeMode$2.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$OnlineEventsBridgeMode$OnlineEventsBridgeModeDelegate.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$OnlineEventsBridgeMode$OnlineEventsBridgeModeDelegate.class new file mode 100644 index 0000000..c384804 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$OnlineEventsBridgeMode$OnlineEventsBridgeModeDelegate.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$OnlineEventsBridgeMode.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$OnlineEventsBridgeMode.class new file mode 100644 index 0000000..26547d7 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$OnlineEventsBridgeMode.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue.class new file mode 100644 index 0000000..fadc8b4 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/PluginEntry.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/PluginEntry.class new file mode 100644 index 0000000..4adc8d0 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/PluginEntry.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/PluginManager.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/PluginManager.class new file mode 100644 index 0000000..f3269dc Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/PluginManager.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/PluginResult$Status.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/PluginResult$Status.class new file mode 100644 index 0000000..85ea8e7 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/PluginResult$Status.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/PluginResult.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/PluginResult.class new file mode 100644 index 0000000..466ec7c Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/PluginResult.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ResumeCallback.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ResumeCallback.class new file mode 100644 index 0000000..bf5db0b Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/ResumeCallback.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/Whitelist$URLPattern.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/Whitelist$URLPattern.class new file mode 100644 index 0000000..d93c691 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/Whitelist$URLPattern.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/Whitelist.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/Whitelist.class new file mode 100644 index 0000000..02a123d Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/Whitelist.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemCookieManager.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemCookieManager.class new file mode 100644 index 0000000..044e534 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemCookieManager.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemExposedJsApi.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemExposedJsApi.class new file mode 100644 index 0000000..8511795 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemExposedJsApi.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$1.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$1.class new file mode 100644 index 0000000..e230047 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$1.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$2.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$2.class new file mode 100644 index 0000000..e36bcf7 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$2.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$3.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$3.class new file mode 100644 index 0000000..849cf96 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$3.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$4.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$4.class new file mode 100644 index 0000000..9c249e7 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$4.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$5.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$5.class new file mode 100644 index 0000000..a5fd02e Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient$5.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient.class new file mode 100644 index 0000000..bd20a86 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebChromeClient.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebView.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebView.class new file mode 100644 index 0000000..9dfe6ed Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebView.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebViewClient.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebViewClient.class new file mode 100644 index 0000000..d231025 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebViewClient.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebViewEngine$1.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebViewEngine$1.class new file mode 100644 index 0000000..8a1bb87 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebViewEngine$1.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebViewEngine$2.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebViewEngine$2.class new file mode 100644 index 0000000..cfb2dfa Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebViewEngine$2.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebViewEngine.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebViewEngine.class new file mode 100644 index 0000000..0d04972 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/engine/SystemWebViewEngine.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/incremental/compileDebugAidl/dependency.store b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/incremental/compileDebugAidl/dependency.store new file mode 100644 index 0000000..8b8400d Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/incremental/compileDebugAidl/dependency.store differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/incremental/mergeDebugAssets/merger.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/incremental/mergeDebugAssets/merger.xml new file mode 100644 index 0000000..50f4386 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/incremental/mergeDebugAssets/merger.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml new file mode 100644 index 0000000..894897f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/incremental/packageDebugResources/merger.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/incremental/packageDebugResources/merger.xml new file mode 100644 index 0000000..5761e6b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/intermediates/incremental/packageDebugResources/merger.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/outputs/aar/CordovaLib-debug.aar b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/outputs/aar/CordovaLib-debug.aar new file mode 100644 index 0000000..d20fad8 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/outputs/aar/CordovaLib-debug.aar differ 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..7465266 --- /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. Please 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 Integer.parseInt(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..2342a16 --- /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-23 +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..4c0d7b9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CallbackContext.java @@ -0,0 +1,144 @@ +/* + 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 android.util.Log; + +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/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..048960b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/Config.java @@ -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. +*/ + +package org.apache.cordova; + +import java.util.List; + +import android.app.Activity; +import android.util.Log; + +@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..868b243 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaActivity.java @@ -0,0 +1,508 @@ +/* + 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.util.Log; +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) { + LOG.i(TAG, "Apache Cordova native platform version " + CordovaWebView.CORDOVA_VERSION + " is starting"); + LOG.d(TAG, "CordovaActivity.onCreate()"); + + // need to activate preferences before super.onCreate to avoid "requestFeature() must be called before adding content" exception + loadConfig(); + 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)) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + 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")) { + int backgroundColor = preferences.getInteger("BackgroundColor", Color.BLACK); + // Background of activity: + appView.getView().setBackgroundColor(backgroundColor); + } + + 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..7bc4a55 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaBridge.java @@ -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. +*/ +package org.apache.cordova; + +import java.security.SecureRandom; + +import org.json.JSONArray; +import org.json.JSONException; + +import android.util.Log; + +/** + * 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..d1420b6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java @@ -0,0 +1,243 @@ +/* + 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.Log; + +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 CordovaPlugin activityResultCallback; + protected CordovaPlugin permissionResultCallback; + 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; + } + + @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 { + if(permissionResultCallback != null) + { + permissionResultCallback.onRequestPermissionResult(requestCode, permissions, grantResults); + permissionResultCallback = null; + } + } + + public void requestPermission(CordovaPlugin plugin, int requestCode, String permission) { + permissionResultCallback = plugin; + String[] permissions = new String [1]; + permissions[0] = permission; + getActivity().requestPermissions(permissions, requestCode); + } + + public void requestPermissions(CordovaPlugin plugin, int requestCode, String [] permissions) + { + permissionResultCallback = plugin; + getActivity().requestPermissions(permissions, requestCode); + } + + 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/platforms/android/platform_www/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 similarity index 100% rename from MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/alertmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/alertmodal.html 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/platforms/android/platform_www/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 similarity index 100% rename from MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/main.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/main.html 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/platforms/android/platform_www/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 similarity index 100% rename from MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/receipt.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/receipt.html 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..0ff4a52 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova_plugins.js @@ -0,0 +1,33 @@ +cordova.define('cordova/plugin_list', function(require, exports, module) { +module.exports = [ + { + "file": "plugins/cordova-plugin-whitelist/whitelist.js", + "id": "cordova-plugin-whitelist.whitelist", + "runs": true + }, + { + "file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js", + "id": "cordova-plugin-inappbrowser.inappbrowser", + "clobbers": [ + "cordova.InAppBrowser.open", + "window.open" + ] + }, + { + "file": "plugins/molpay-mobile-xdk-cordova/molpay.js", + "id": "molpay-mobile-xdk-cordova.MOLPay", + "clobbers": [ + "molpay" + ] + } +]; +module.exports.metadata = +// TOP OF METADATA +{ + "cordova-plugin-whitelist": "1.2.1", + "cordova-plugin-inappbrowser": "1.4.0", + "cordova-plugin-privacyscreen": "0.3.1", + "molpay-mobile-xdk-cordova": "2.0.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..9b4fd5d --- /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..3b67650 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/js/index.js @@ -0,0 +1,54 @@ +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' : '' + // '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 + }; + + 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/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..c013960 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/index.html @@ -0,0 +1 @@ +

    Loading.

    Please wait.

    Loading...
    \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js similarity index 100% rename from MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/vendor.5c22674a.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/vendor.5c22674a.js new file mode 100644 index 0000000..57e8643 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/vendor.5c22674a.js @@ -0,0 +1,13 @@ +!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&&console.log("WARNING: Tried to load angular more than once.")):(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))}}}}])}(),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(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(){console.log("Luhn::ctor");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(console.log("Luhn::check"),!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(){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),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}); \ 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.d7816846.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/styles/main.d7816846.css new file mode 100644 index 0000000..4aa81d5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/styles/main.d7816846.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}.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}.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;height:64px}.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}} \ 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/platforms/ios/platform_www/molpay-mobile-xdk-www/views/alertmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/alertmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/alertmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/alertmodal.html diff --git a/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/banklistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/banklistmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/banklistmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/banklistmodal.html diff --git a/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/cardlistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/cardlistmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/cardlistmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/cardlistmodal.html diff --git a/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/channelmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/channelmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/channelmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/channelmodal.html diff --git a/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/countrylistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/countrylistmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/countrylistmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/countrylistmodal.html diff --git a/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/finalizingpayment.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/finalizingpayment.html similarity index 100% rename from MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/finalizingpayment.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/finalizingpayment.html diff --git a/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/main.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/main.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/main.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/main.html diff --git a/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/paymentinfo.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/paymentinfo.html similarity index 100% rename from MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/paymentinfo.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/paymentinfo.html diff --git a/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/receipt.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/receipt.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/receipt.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/views/receipt.html 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..3e87a6e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -0,0 +1,114 @@ +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", []); + }, + 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-whitelist/whitelist.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-whitelist/whitelist.js new file mode 100644 index 0000000..a2ba8a3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-whitelist/whitelist.js @@ -0,0 +1,30 @@ +cordova.define("cordova-plugin-whitelist.whitelist", 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. + * +*/ + +if (!document.querySelector('meta[http-equiv=Content-Security-Policy]')) { + var msg = 'No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.'; + console.error(msg); + setInterval(function() { + console.warn(msg); + }, 10000); +} + +}); 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..c7a2cff --- /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://",molpayresulturl="https://www.onlinepayment.com.my/MOLPay/result.php",molpaynbepayurl="https://www.onlinepayment.com.my/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){isInternalDebugging&&console.log("postMolpayResultHandler innHtml = "+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),isInternalDebugging&&console.log("innHtmlString = "+b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(isInternalDebugging&&console.log("onMolpayUiFrameLoad B4 results = "+b),g=JSON.parse(b))){var h=g.tranID;h&&(isInternalDebugging&&console.log("mainUiFrame.contentWindow.transactionRequestWithTransactionId = "+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){isInternalDebugging&&console.log("onBankUiLoadstop event.url ="+a.url);var b;b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpaynbepayurl found"),bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){isInternalDebugging&&console.log("bankUiWindow window.open to window.location inject ok")}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){isInternalDebugging&&console.log("bankUiWindow window.close to window.location.assign inject ok")}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){isInternalDebugging&&console.log("onBankUiLoadstart event.url = "+a.url);var b;if(b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstart molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b),postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)){isInternalDebugging&&console.log("onBankUiLoadstart molpaynbepayurl found");var c=10,f=0,g=setInterval(function(){h()},1e3),h=function(){f++,f>c?clearInterval(g):bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b);var c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(g))})}}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){var b,c;if(a&&a.indexOf(mpopenmolpaywindow)>-1)c=new RegExp(mpopenmolpaywindow,"g"),b=a.replace(c,""),b&&b.length>0&&(isInternalDebugging&&console.log("inAppCallback base64HtmlString = ",b),createBankUiWindow(b));else if(a&&a.indexOf(mptransactionresults)>-1&&(c=new RegExp(mptransactionresults,"g"),b=a.replace(c,""),b&&b.length>0)){var d=window.atob(b),e=JSON.stringify(JSON.parse(d));transactionResultCallback(e),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(c=new RegExp(mprunscriptonpopup,"g"),b=a.replace(c,""),b&&b.length>0)){var f=window.atob(b);isInternalDebugging&&console.log("run script on popup, script ="+f),bankUiWindow.executeScript({code:f},function(a){isInternalDebugging&&console.log("run script on popup ok")})}},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isInternalDebugging&&console.log("MOLPay startmolpay paymentdetails = "+JSON.stringify(a,null,"")),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(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){isInternalDebugging&&console.log("MOLPay transactionRequest paymentdetails = "+JSON.stringify(a,null,""));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(){isClosingMolpay=!0,mainUiFrame.contentWindow.transactionRequest()};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..f7dae9f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/build.gradle @@ -0,0 +1,305 @@ +/* + 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! + +apply plugin: 'android' + +buildscript { + repositories { + mavenCentral() + } + + // 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.5.0' + } + } + +// Allow plugins to declare Maven dependencies via build-extras.gradle. +repositories { + mavenCentral() +} + +task wrapper(type: Wrapper) { + gradleVersion = '2.8' +} + +// 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 ?: Integer.parseInt("" + privateHelpers.extractIntFromManifest("versionCode") + "0") + 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 + 2 + ndk { + abiFilters "armeabi-v7a", "" + } + } + x86 { + versionCode defaultConfig.versionCode + 4 + ndk { + abiFilters "x86", "" + } + } + all { + ndk { + abiFilters "all", "" + } + } + } + } 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') { + 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..ad6f71c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/Api.js @@ -0,0 +1,504 @@ +/** + 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 CordovaError = require('cordova-common').CordovaError; +var PlatformJson = require('cordova-common').PlatformJson; +var ActionStack = require('cordova-common').ActionStack; +var AndroidProject = require('./lib/AndroidProject'); +var PlatformMunger = require('cordova-common').ConfigChanges.PlatformMunger; +var PluginInfoProvider = require('cordova-common').PluginInfoProvider; + +var ConsoleLogger = require('./lib/ConsoleLogger'); +var pluginHandlers = require('./lib/pluginHandlers'); + +var PLATFORM = 'android'; + +/** + * 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, '..'); + this.events = events || ConsoleLogger.get(); + // NOTE: trick to share one EventEmitter instance across all js code + require('cordova-common').events = this.events; + + this._platformJson = PlatformJson.load(this.root, platform); + this._pluginInfoProvider = new PluginInfoProvider(); + this._munger = new PlatformMunger(this.platform, this.root, this._platformJson, this._pluginInfoProvider); + + var self = this; + + this.locations = { + root: self.root, + www: path.join(self.root, 'assets/www'), + 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'), + // NOTE: Due to platformApi spec we need to return relative paths here + cordovaJs: 'bin/templates/project/assets/www/cordova.js', + cordovaJsSrc: 'cordova-js-src' + }; +} + +/** + * 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) { + return require('../../lib/create') + .create(destination, config, options, events || ConsoleLogger.get()) + .then(function (destination) { + var PlatformApi = require(path.resolve(destination, 'cordova/Api')); + return new PlatformApi(PLATFORM, destination, events); + }); +}; + +/** + * 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) { + return require('../../lib/create') + .update(destination, options, events || ConsoleLogger.get()) + .then(function (destination) { + var PlatformApi = require(path.resolve(destination, 'cordova/Api')); + return new PlatformApi('android', destination, events); + }); +}; + +/** + * 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) { + return require('./lib/prepare').prepare.call(this, cordovaProject); +}; + +/** + * 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) { + + if (!plugin || plugin.constructor.name !== 'PluginInfo') + return Q.reject(new CordovaError('The parameter is incorrect. The first parameter to addPlugin should be a PluginInfo instance')); + + installOptions = installOptions || {}; + installOptions.variables = installOptions.variables || {}; + + var self = this; + var actions = new ActionStack(); + var project = AndroidProject.getProjectFile(this.root); + + // gather all files needs to be handled during install + plugin.getFilesAndFrameworks(this.platform) + .concat(plugin.getAssets(this.platform)) + .concat(plugin.getJsModules(this.platform)) + .forEach(function(item) { + actions.push(actions.createAction( + pluginHandlers.getInstaller(item.itemType), [item, plugin, project, installOptions], + pluginHandlers.getUninstaller(item.itemType), [item, plugin, project, installOptions])); + }); + + // run through the action stack + return actions.process(this.platform) + .then(function () { + if (project) { + project.write(); + } + + // Add PACKAGE_NAME variable into vars + if (!installOptions.variables.PACKAGE_NAME) { + installOptions.variables.PACKAGE_NAME = project.getPackageName(); + } + + self._munger + // Ignore passed `is_top_level` option since platform itself doesn't know + // anything about managing dependencies - it's responsibility of caller. + .add_plugin_changes(plugin, installOptions.variables, /*is_top_level=*/true, /*should_increment=*/true) + .save_all(); + + if (plugin.getFrameworks(self.platform).length > 0) { + self.events.emit('verbose', 'Updating build files since android plugin contained '); + require('./lib/builders/builders').getBuilder('gradle').prepBuildFiles(); + } + + var targetDir = installOptions.usePlatformWww ? + self.locations.platformWww : + self.locations.www; + + self._addModulesInfo(plugin, targetDir); + }); +}; + +/** + * 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) { + + if (!plugin || plugin.constructor.name !== 'PluginInfo') + return Q.reject(new CordovaError('The parameter is incorrect. The first parameter to addPlugin should be a PluginInfo instance')); + + var self = this; + var actions = new ActionStack(); + var project = AndroidProject.getProjectFile(this.root); + + // queue up plugin files + plugin.getFilesAndFrameworks(this.platform) + .concat(plugin.getAssets(this.platform)) + .concat(plugin.getJsModules(this.platform)) + .forEach(function(item) { + actions.push(actions.createAction( + pluginHandlers.getUninstaller(item.itemType), [item, plugin, project, uninstallOptions], + pluginHandlers.getInstaller(item.itemType), [item, plugin, project, uninstallOptions])); + }); + + // run through the action stack + return actions.process(this.platform) + .then(function() { + if (project) { + project.write(); + } + + self._munger + // Ignore passed `is_top_level` option since platform itself doesn't know + // anything about managing dependencies - it's responsibility of caller. + .remove_plugin_changes(plugin, /*is_top_level=*/true) + .save_all(); + + if (plugin.getFrameworks(self.platform).length > 0) { + self.events.emit('verbose', 'Updating build files since android plugin contained '); + require('./lib/builders/builders').getBuilder('gradle').prepBuildFiles(); + } + + var targetDir = uninstallOptions.usePlatformWww ? + self.locations.platformWww : + self.locations.www; + + self._removeModulesInfo(plugin, targetDir); + }); +}; + +/** + * 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. + * + * @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); + }); +}; + +/** + * 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; + +/** + * Removes the specified modules from list of installed modules and updates + * platform_json and cordova_plugins.js on disk. + * + * @param {PluginInfo} plugin PluginInfo instance for plugin, which modules + * needs to be added. + * @param {String} targetDir The directory, where updated cordova_plugins.js + * should be written to. + */ +Api.prototype._addModulesInfo = function(plugin, targetDir) { + var installedModules = this._platformJson.root.modules || []; + + var installedPaths = installedModules.map(function (installedModule) { + return installedModule.file; + }); + + var modulesToInstall = plugin.getJsModules(this.platform) + .filter(function (moduleToInstall) { + return installedPaths.indexOf(moduleToInstall.file) === -1; + }).map(function (moduleToInstall) { + var moduleName = plugin.id + '.' + ( moduleToInstall.name || moduleToInstall.src.match(/([^\/]+)\.js/)[1] ); + var obj = { + file: ['plugins', plugin.id, moduleToInstall.src].join('/'), + id: moduleName + }; + if (moduleToInstall.clobbers.length > 0) { + obj.clobbers = moduleToInstall.clobbers.map(function(o) { return o.target; }); + } + if (moduleToInstall.merges.length > 0) { + obj.merges = moduleToInstall.merges.map(function(o) { return o.target; }); + } + if (moduleToInstall.runs) { + obj.runs = true; + } + + return obj; + }); + + this._platformJson.root.modules = installedModules.concat(modulesToInstall); + if (!this._platformJson.root.plugin_metadata) { + this._platformJson.root.plugin_metadata = {}; + } + this._platformJson.root.plugin_metadata[plugin.id] = plugin.version; + + this._writePluginModules(targetDir); + this._platformJson.save(); +}; + +/** + * Removes the specified modules from list of installed modules and updates + * platform_json and cordova_plugins.js on disk. + * + * @param {PluginInfo} plugin PluginInfo instance for plugin, which modules + * needs to be removed. + * @param {String} targetDir The directory, where updated cordova_plugins.js + * should be written to. + */ +Api.prototype._removeModulesInfo = function(plugin, targetDir) { + var installedModules = this._platformJson.root.modules || []; + var modulesToRemove = plugin.getJsModules(this.platform) + .map(function (jsModule) { + return ['plugins', plugin.id, jsModule.src].join('/'); + }); + + var updatedModules = installedModules + .filter(function (installedModule) { + return (modulesToRemove.indexOf(installedModule.file) === -1); + }); + + this._platformJson.root.modules = updatedModules; + if (this._platformJson.root.plugin_metadata) { + delete this._platformJson.root.plugin_metadata[plugin.id]; + } + + this._writePluginModules(targetDir); + this._platformJson.save(); +}; + +/** + * Fetches all installed modules, generates cordova_plugins contents and writes + * it to file. + * + * @param {String} targetDir Directory, where write cordova_plugins.js to. + * Ususally it is either /www or /platform_www + * directories. + */ +Api.prototype._writePluginModules = function (targetDir) { + // Write out moduleObjects as JSON wrapped in a cordova module to cordova_plugins.js + var final_contents = 'cordova.define(\'cordova/plugin_list\', function(require, exports, module) {\n'; + final_contents += 'module.exports = ' + JSON.stringify(this._platformJson.root.modules, null, ' ') + ';\n'; + final_contents += 'module.exports.metadata = \n'; + final_contents += '// TOP OF METADATA\n'; + + final_contents += JSON.stringify(this._platformJson.root.plugin_metadata, null, 4) + ';\n'; + final_contents += '// BOTTOM OF METADATA\n'; + final_contents += '});'; // Close cordova.define. + + shell.mkdir('-p', targetDir); + fs.writeFileSync(path.join(targetDir, 'cordova_plugins.js'), final_contents, 'utf-8'); +}; 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..de86a36 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/build @@ -0,0 +1,48 @@ +#!/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; + +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..1f4a53d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/clean @@ -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 Api = require('./Api'); +var path = require('path'); + +// 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); +} + +new Api().clean({argv: process.argv.slice(2)}) +.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..98cd990 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/Adb.js @@ -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. +*/ + +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 + '...'); + 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/)) + return Q.reject(new CordovaError('Failed to install apk to device: ' + output)); + }); +}; + +Adb.uninstall = function (target, packageId) { + events.emit('verbose', 'Uninstalling ' + packageId + ' from ' + target + '...'); + return spawn('adb', ['-s', target, 'uninstall', packageId], {cwd: os.tmpdir()}); +}; + +Adb.shell = function (target, shellCommand) { + events.emit('verbose', 'Running command "' + shellCommand + '" on ' + 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 + '...'); + 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..3654ada --- /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(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..458b84e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/AndroidProject.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 fs = require('fs'); +var path = require('path'); +var properties_parser = require('properties-parser'); +var AndroidManifest = require('./AndroidManifest'); + +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'); +} + +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() { + return new AndroidManifest(path.join(this.projectDir, 'AndroidManifest.xml')).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]; +}; + + +module.exports = AndroidProject; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/ConsoleLogger.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/ConsoleLogger.js new file mode 100644 index 0000000..cee2dc1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/ConsoleLogger.js @@ -0,0 +1,75 @@ +/** + 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 loggerInstance; +var util = require('util'); +var EventEmitter = require('events').EventEmitter; +var CordovaError = require('cordova-common').CordovaError; + +/** + * @class ConsoleLogger + * @extends EventEmitter + * + * Implementing basic logging for platform. Inherits regular NodeJS + * EventEmitter. All events, emitted on this class instance are immediately + * logged to console. + * + * Also attaches handler to process' uncaught exceptions, so these exceptions + * logged to console similar to regular error events. + */ +function ConsoleLogger() { + EventEmitter.call(this); + + var isVerbose = process.argv.indexOf('-d') >= 0 || process.argv.indexOf('--verbose') >= 0; + // For CordovaError print only the message without stack trace unless we + // are in a verbose mode. + process.on('uncaughtException', function(err){ + if ((err instanceof CordovaError) && isVerbose) { + console.error(err.stack); + } else { + console.error(err.message); + } + process.exit(1); + }); + + this.on('results', console.log); + this.on('verbose', function () { + if (isVerbose) + console.log.apply(console, arguments); + }); + this.on('info', console.log); + this.on('log', console.log); + this.on('warn', console.warn); +} +util.inherits(ConsoleLogger, EventEmitter); + +/** + * Returns already instantiated/newly created instance of ConsoleLogger class. + * This method should be used instead of creating ConsoleLogger directly, + * otherwise we'll get multiple handlers attached to process' + * uncaughtException + * + * @return {ConsoleLogger} New or already created instance of ConsoleLogger + */ +ConsoleLogger.get = function () { + loggerInstance = loggerInstance || new ConsoleLogger(); + return loggerInstance; +}; + +module.exports = ConsoleLogger; 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); + var self = this; + return builder.prepEnv(opts) + .then(function() { + if (opts.prepEnv) { + self.events.emit('verbose', 'Build file successfully prepared.'); + return; + } + return builder.build(opts) + .then(function() { + var apkPaths = builder.findOutputApks(opts.buildType, opts.arch); + self.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. + return spawn('killall', ['adb']) + .then(function() { + events.emit('verbose', 'adb seems hung. retrying.'); + return helper() + .then(null, function() { + // The double kill is sadly often necessary, at least on mac. + events.emit('warn', 'Now device not found... restarting adb again.'); + return spawn('killall', ['adb']) + .then(function() { + return helper() + .then(null, function() { + return Q.reject(new CordovaError('USB is flakey. 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..7094fe5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/AntBuilder.js @@ -0,0 +1,141 @@ +/* + 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. Please build using gradle.'); + } + + 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: 'inherit'}); + }); +}; + +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..6363b29 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/GenericBuilder.js @@ -0,0 +1,138 @@ +/* + 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) { + 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..0593f9b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/GradleBuilder.js @@ -0,0 +1,275 @@ +/* + 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 child_process = require('child_process'); +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'); + // 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; + for (var i = 0; i < subProjects.length; ++i) { + if (subProjects[i] !== 'CordovaLib') { + shell.cp('-f', pluginBuildGradle, path.join(this.root, subProjects[i], 'build.gradle')); + } + } + + 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 = ''; + subProjects.forEach(function(p) { + var libName=p.replace(/[/\\]/g, ':').replace(name+'-',''); + depsList += ' debugCompile project(path: "' + libName + '", configuration: "debug")\n'; + depsList += ' releaseCompile project(path: "' + libName + '", configuration: "release")\n'; + }); + // 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'] || 'http\\://services.gradle.org/distributions/gradle-2.2.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 spawnAndSuppressJavaOptions(wrapper, args); +}; + +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; +} + +/** + * A special superspawn-like implementation, required to workaround 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. + * + * This function needed because superspawn does not provide a way to get and + * manage spawned process output streams. There is a CB-10052 which describes + * an improvements for superspawn, needed to get rid of this. + * TODO: Once this improvement added to cordova-common, we could remove this functionality. + * + * @param {String} cmd A command to spawn + * @param {String[]} args Command arguments. Note that on Windows arguments + * will be concatenated into string and passed to 'cmd.exe' along with '/s' + * and '/c' switches for proper space-in-path handling + * + * @return {Promise} A promise, rejected with error message if + * underlying command exits with nonzero exit code, fulfilled otherwise + */ +function spawnAndSuppressJavaOptions(cmd, args) { + var opts = { stdio: 'pipe' }; + + if (process.platform === 'win32') { + // Work around spawn not being able to find .bat files. + var joinedArgs = [cmd] + .concat(args) + .map(function(a){ + // Add quotes to arguments which contains whitespaces + if (/^[^"].* .*[^"]/.test(a)) return '"' + a + '"'; + return a; + }).join(' '); + + args = ['/s', '/c'].concat('"' + joinedArgs + '"'); + cmd = 'cmd'; + opts.windowsVerbatimArguments = true; + } + + return Q.Promise(function (resolve, reject) { + var proc = child_process.spawn(cmd, args, opts); + + proc.stdout.on('data', process.stdout.write.bind(process.stdout)); + proc.stderr.on('data', function (data) { + var suppressThisLine = /^Picked up _JAVA_OPTIONS: /i.test(data.toString()); + if (suppressThisLine) { + return; + } + + process.stderr.write(data); + }); + + proc.on('exit', function(code) { + if (code) { + reject('Error code ' + code + ' for command: ' + cmd + ' with args: ' + args); + } else { + resolve(); + } + }); + }); +} 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..73b2b99 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/check_reqs.js @@ -0,0 +1,330 @@ +#!/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 "java -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'; + } + return tryCommand('java -version', msg) + .then(function() { + // 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) { + var match = /javac ((?:\d+\.)+(?:\d+))/i.exec(output)[1]; + 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.'); + } + }); +}; + +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(valid_target) { + // valid_target can look like: + // android-19 + // android-L + // Google Inc.:Google APIs:20 + // Google Inc.:Glass Development Kit Preview:20 + if (!valid_target) 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(); + throw new CordovaError('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)'); + }); +}; + +// Returns a promise. +module.exports.run = function() { + return Q.all([this.check_java(), this.check_android().then(this.check_android_target)]) + .then(function() { + console.log('ANDROID_HOME=' + process.env['ANDROID_HOME']); + console.log('JAVA_HOME=' + process.env['JAVA_HOME']); + }); +}; + +/** + * 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..4f9acc8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/device.js @@ -0,0 +1,119 @@ +#!/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); + + 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..96bb5c9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/emulator.js @@ -0,0 +1,408 @@ +#!/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(/Path:\s/)) { + i++; + img_obj['path'] = response[i].split('Path: ')[1].replace('\r', ''); + } + if (response[i + 1].match(/\(API\slevel\s/)) { + i++; + img_obj['target'] = response[i].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; + }); +}; + +/* + * 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) { + var uuid = 'cordova_emulator_' + new Date().getTime(); + var uuidProp = 'emu.uuid=' + uuid; + var args = ['-avd', emulatorId, '-prop', uuidProp]; + // 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...'); + return self.wait_for_emulator(uuid); + }).then(function(emulatorId) { + if (!emulatorId) + return Q.reject(new CordovaError('Failed to start emulator')); + + //wait for emulator to boot up + process.stdout.write('Booting up emulator (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 with given uuid to apear on the started-emulator list. + * Returns a promise with this emulator's ID. + */ +module.exports.wait_for_emulator = function(uuid) { + var self = this; + return self.list_started() + .then(function(new_started) { + var emulator_id = null; + var promises = []; + + new_started.forEach(function (emulator) { + promises.push( + Adb.shell(emulator, 'getprop emu.uuid') + .then(function (output) { + if (output.indexOf(uuid) >= 0) { + emulator_id = emulator; + } + }) + ); + }); + + return Q.all(promises).then(function () { + return emulator_id || self.wait_for_emulator(uuid); + }); + }); +}; + +/* + * 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 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('Please insure 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 started emulators found, please start an emultor 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('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)) 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 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(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..e390bff --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-devices @@ -0,0 +1,33 @@ +#!/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 +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..996cf55 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-emulator-images @@ -0,0 +1,32 @@ +#!/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 +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..2ae8c5a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-started-emulators @@ -0,0 +1,32 @@ +#!/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 +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..b345b90 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/plugin-build.gradle @@ -0,0 +1,79 @@ +/* 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() + } + + // 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 + if (gradle.gradleVersion >= "2.2") { + dependencies { + classpath 'com.android.tools.build:gradle:1.0.0+' + } + } else if (gradle.gradleVersion >= "2.1") { + dependencies { + classpath 'com.android.tools.build:gradle:0.14.0+' + } + } else { + dependencies { + classpath 'com.android.tools.build:gradle:0.12.0+' + } + } +} + +apply plugin: '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..381734d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/pluginHandlers.js @@ -0,0 +1,252 @@ +/* + * + * 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(' element is missing "src" attribute for plugin: ' + plugin.id); + if (!obj.targetDir) throw new CordovaError(' element is missing "target-dir" attribute for plugin: ' + plugin.id); + var dest = path.join(obj.targetDir, path.basename(obj.src)); + 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)); + deleteJava(project.projectDir, dest); + } + }, + 'lib-file':{ + install:function(obj, plugin, project, options) { + var dest = path.join('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)); + 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('src not specified in for plugin: ' + 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('src not specified in for plugin: ' + 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.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(' tag without required "src" attribute. plugin=' + plugin.dir); + } + if (!obj.target) { + throw new CordovaError(' tag without required "target" attribute'); + } + + var www = options.usePlatformWww ? project.platformWww : project.www; + copyFile(plugin.dir, obj.src, www, obj.target); + }, + uninstall:function(obj, plugin, project, options) { + var target = obj.target || obj.src; + + if (!target) throw new CordovaError(' tag without required "target" attribute'); + + var www = options.usePlatformWww ? project.platformWww : project.www; + removeFile(www, target); + removeFileF(path.resolve(www, '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.parse(obj.src).name); + + // 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 www = options.usePlatformWww ? project.platformWww : project.www; + var moduleDestination = path.resolve(www, 'plugins', plugin.id, obj.src); + shell.mkdir('-p', path.dirname(moduleDestination)); + fs.writeFileSync(moduleDestination, scriptContent, 'utf-8'); + }, + uninstall: function (obj, plugin, project, options) { + var pluginRelativePath = path.join('plugins', plugin.id, obj.src); + var www = options.usePlatformWww ? project.platformWww : project.www; + removeFileAndParents(www, 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('"' + src + '" not located within plugin!'); + + dest = path.resolve(project_dir, dest); + + // check that dest path is located in project directory + if (dest.indexOf(project_dir) !== 0) + throw new CordovaError('"' + dest + '" not located within project!'); + + shell.mkdir('-p', path.dirname(dest)); + + if (link) { + fs.symlinkSync(path.relative(path.dirname(dest), 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); +} + +// 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; + } + } +} 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..3fba9fd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/prepare.js @@ -0,0 +1,379 @@ +/** + 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; + +module.exports.prepare = function (cordovaProject) { + + var self = this; + + this._config = updateConfigFilesFrom(cordovaProject.projectConfig, + this._munger, this.locations); + + // Update own www dir with project's www assets and plugins' assets and js-files + return Q.when(updateWwwFrom(cordovaProject, this.locations)) + .then(function () { + // update project according to config.xml changes. + return updateProjectAccordingTo(self._config, self.locations); + }) + .then(function () { + handleIcons(cordovaProject.projectConfig, self.root); + handleSplashes(cordovaProject.projectConfig, self.root); + }) + .then(function () { + self.events.emit('verbose', 'updated project successfully'); + }); +}; + +/** + * 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 config.xml from defaults for platform "android"'); + + // 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(); + + // 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; +} + +/** + * 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 updateWwwFrom(cordovaProject, destinations) { + shell.rm('-rf', destinations.www); + shell.mkdir('-p', destinations.www); + // Copy source files from project's www directory + shell.cp('-rf', path.join(cordovaProject.locations.www, '*'), destinations.www); + // Override www sources by files in 'platform_www' directory + shell.cp('-rf', path.join(destinations.platformWww, '*'), destinations.www); + + // 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" for android platform. Copying over existing "www" files.'); + var overrides = path.join(merges_path, '*'); + shell.cp('-rf', overrides, destinations.www); + } +} + +/** + * 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; + fs.writeFileSync(locations.strings, strings.write({indent: 4}), 'utf-8'); + events.emit('verbose', 'Wrote out Android application name to "' + name + '"'); + + // 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(findOrientationValue(platformConfig)) + .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 which extend CordovaActivity.'); + } else if(java_files.length > 1) { + events.emit('log', 'Multiple candidate Java files (.java files which 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 to "' + pkg + '"'); + + 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]; + } + return versionCode; +} + +function copyImage(src, resourcesDir, density, name) { + var destFolder = path.join(resourcesDir, (density ? 'drawable-': 'drawable') + density); + var isNinePatch = !!/\.9\.png$/.exec(src); + var ninePatchName = name.replace(/\.png$/, '.9.png'); + + // default template does not have default asset for this density + if (!fs.existsSync(destFolder)) { + fs.mkdirSync(destFolder); + } + + var destFilePath = path.join(destFolder, isNinePatch ? ninePatchName : name); + events.emit('verbose', 'copying image from ' + src + ' to ' + destFilePath); + shell.cp('-f', src, destFilePath); +} + +function handleSplashes(projectConfig, platformRoot) { + var resources = projectConfig.getSplashScreens('android'); + // if there are "splash" elements in config.xml + if (resources.length > 0) { + deleteDefaultResourceAt(platformRoot, 'screen.png'); + events.emit('verbose', 'splash screens: ' + JSON.stringify(resources)); + + // The source paths for icons and splashes are relative to + // project's config.xml location, so we use it as base path. + var projectRoot = path.dirname(projectConfig.path); + var destination = path.join(platformRoot, 'res'); + + var hadMdpi = false; + resources.forEach(function (resource) { + if (!resource.density) { + return; + } + if (resource.density == 'mdpi') { + hadMdpi = true; + } + copyImage(path.join(projectRoot, resource.src), destination, resource.density, 'screen.png'); + }); + // There's no "default" drawable, so assume default == mdpi. + if (!hadMdpi && resources.defaultResource) { + copyImage(path.join(projectRoot, resources.defaultResource.src), destination, 'mdpi', 'screen.png'); + } + } +} + +function handleIcons(projectConfig, platformRoot) { + var icons = 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; + } + + deleteDefaultResourceAt(platformRoot, '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; + 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; +} + +/** + * Queries ConfigParser object for the orientation value. Warns if + * global preference value is not supported by platform. + * + * @param {Object} platformConfig ConfigParser object + * + * @return {String} Global/platform-specific orientation in lower-case + * (or empty string if both are undefined). + */ +function findOrientationValue(platformConfig) { + + var ORIENTATION_DEFAULT = 'default'; + + var orientation = platformConfig.getPreference('orientation'); + if (!orientation) { + return ORIENTATION_DEFAULT; + } + + var GLOBAL_ORIENTATIONS = ['default', 'portrait','landscape']; + function isSupported(orientation) { + return GLOBAL_ORIENTATIONS.indexOf(orientation.toLowerCase()) >= 0; + } + + // Check if the given global orientation is supported + if (orientation && isSupported(orientation)) { + return orientation; + } + + events.emit('warn', 'Unsupported global orientation: ' + orientation + + '. Defaulting to value: ' + ORIENTATION_DEFAULT); + return ORIENTATION_DEFAULT; +} 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..3cc5c0d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/run.js @@ -0,0 +1,140 @@ +#!/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'); + +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) { + self.events.emit('warn', 'No target specified, deploying to device \'' + device_list[0] + '\'.'); + install_target = device_list[0]; + } else { + self.events.emit('warn', 'No target specified, 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/node_modules/abbrev/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/.npmignore new file mode 100644 index 0000000..9d6cd2f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/.npmignore @@ -0,0 +1,4 @@ +.nyc_output +nyc_output +node_modules +coverage diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/.travis.yml new file mode 100644 index 0000000..991d04b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - '0.10' + - '0.12' + - 'iojs' diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/CONTRIBUTING.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/CONTRIBUTING.md new file mode 100644 index 0000000..2f30261 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/CONTRIBUTING.md @@ -0,0 +1,3 @@ + To get started, sign the + Contributor License Agreement. 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..700d159 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/package.json @@ -0,0 +1,74 @@ +{ + "_args": [ + [ + "abbrev@1", + "/Users/steveng/repo/cordova/cordova-android/node_modules/nopt" + ] + ], + "_from": "abbrev@>=1.0.0 <2.0.0", + "_id": "abbrev@1.0.7", + "_inCache": true, + "_installable": true, + "_location": "/abbrev", + "_nodeVersion": "2.0.1", + "_npmUser": { + "email": "isaacs@npmjs.com", + "name": "isaacs" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "abbrev", + "raw": "abbrev@1", + "rawSpec": "1", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/nopt" + ], + "_resolved": "http://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz", + "_shasum": "5b6035b2ee9d4fb5cf859f08a9be81b208491843", + "_shrinkwrap": null, + "_spec": "abbrev@1", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/nopt", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter" + }, + "bugs": { + "url": "https://github.com/isaacs/abbrev-js/issues" + }, + "dependencies": {}, + "description": "Like ruby's abbrev module, but in js", + "devDependencies": { + "tap": "^1.2.0" + }, + "directories": {}, + "dist": { + "shasum": "5b6035b2ee9d4fb5cf859f08a9be81b208491843", + "tarball": "http://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz" + }, + "gitHead": "821d09ce7da33627f91bbd8ed631497ed6f760c2", + "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.7" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/test.js new file mode 100644 index 0000000..eb30e42 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/test.js @@ -0,0 +1,47 @@ +var abbrev = require('./abbrev.js') +var assert = require("assert") +var util = require("util") + +console.log("TAP version 13") +var count = 0 + +function test (list, expect) { + count++ + var actual = abbrev(list) + assert.deepEqual(actual, expect, + "abbrev("+util.inspect(list)+") === " + util.inspect(expect) + "\n"+ + "actual: "+util.inspect(actual)) + actual = abbrev.apply(exports, list) + assert.deepEqual(abbrev.apply(exports, list), expect, + "abbrev("+list.map(JSON.stringify).join(",")+") === " + util.inspect(expect) + "\n"+ + "actual: "+util.inspect(actual)) + console.log('ok - ' + list.join(' ')) +} + +test([ "ruby", "ruby", "rules", "rules", "rules" ], +{ rub: 'ruby' +, ruby: 'ruby' +, rul: 'rules' +, rule: 'rules' +, rules: 'rules' +}) +test(["fool", "foom", "pool", "pope"], +{ fool: 'fool' +, foom: 'foom' +, poo: 'pool' +, pool: 'pool' +, pop: 'pope' +, pope: 'pope' +}) +test(["a", "ab", "abc", "abcd", "abcde", "acde"], +{ a: 'a' +, ab: 'ab' +, abc: 'abc' +, abcd: 'abcd' +, abcde: 'abcde' +, ac: 'acde' +, acd: 'acde' +, acde: 'acde' +}) + +console.log("1..%d", count) 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", + "_id": "ansi@0.3.1", + "_inCache": true, + "_installable": true, + "_location": "/ansi", + "_nodeVersion": "5.3.0", + "_npmUser": { + "email": "nathan@tootallnate.net", + "name": "tootallnate" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "name": "ansi", + "raw": "ansi@^0.3.1", + "rawSpec": "^0.3.1", + "scope": null, + "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": { + "email": "nathan@tootallnate.net", + "name": "Nathan Rajlich", + "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": "http://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz" + }, + "gitHead": "4d0d4af94e0bdaa648bd7262acd3bde4b98d5246", + "homepage": "https://github.com/TooTallNate/ansi.js#readme", + "keywords": [ + "256", + "ansi", + "color", + "cursor", + "formatting", + "rgb", + "stream", + "terminal" + ], + "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..fd4f2b0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/.npmignore @@ -0,0 +1,2 @@ +node_modules +.DS_Store diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/.travis.yml new file mode 100644 index 0000000..6e5919d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" 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/Makefile b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/Makefile new file mode 100644 index 0000000..fa5da71 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/Makefile @@ -0,0 +1,6 @@ + +test: + @node_modules/.bin/tape test/*.js + +.PHONY: test + 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..421f3aa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/README.md @@ -0,0 +1,89 @@ +# balanced-match + +Match balanced string pairs, like `{` and `}` or `` and ``. + +[![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')); +``` + +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' } +``` + +## 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', '']`. + +### 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 ]`. + +## 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/example.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/example.js new file mode 100644 index 0000000..c02ad34 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/example.js @@ -0,0 +1,5 @@ +var balanced = require('./'); + +console.log(balanced('{', '}', 'pre{in{nested}}post')); +console.log(balanced('{', '}', 'pre{first}between{second}post')); + 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..75f3d71 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/index.js @@ -0,0 +1,50 @@ +module.exports = balanced; +function balanced(a, 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) + }; +} + +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 < str.length && 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..044a171 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + "balanced-match@^0.3.0", + "/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion" + ] + ], + "_from": "balanced-match@>=0.3.0 <0.4.0", + "_id": "balanced-match@0.3.0", + "_inCache": true, + "_installable": true, + "_location": "/balanced-match", + "_nodeVersion": "4.2.1", + "_npmUser": { + "email": "julian@juliangruber.com", + "name": "juliangruber" + }, + "_npmVersion": "2.14.7", + "_phantomChildren": {}, + "_requested": { + "name": "balanced-match", + "raw": "balanced-match@^0.3.0", + "rawSpec": "^0.3.0", + "scope": null, + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/brace-expansion" + ], + "_resolved": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz", + "_shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756", + "_shrinkwrap": null, + "_spec": "balanced-match@^0.3.0", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion", + "author": { + "email": "mail@juliangruber.com", + "name": "Julian Gruber", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/balanced-match/issues" + }, + "dependencies": {}, + "description": "Match balanced character pairs, like \"{\" and \"}\"", + "devDependencies": { + "tape": "~4.2.2" + }, + "directories": {}, + "dist": { + "shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756", + "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz" + }, + "gitHead": "a7114b0986554787e90b7ac595a043ca75ea77e5", + "homepage": "https://github.com/juliangruber/balanced-match", + "keywords": [ + "balanced", + "match", + "parse", + "regexp", + "test" + ], + "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": { + "browsers": [ + "android-browser/4.2..latest", + "chrome/25..latest", + "chrome/canary", + "firefox/20..latest", + "firefox/nightly", + "ie/8..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "opera/12..latest", + "opera/next", + "safari/5.1..latest" + ], + "files": "test/*.js" + }, + "version": "0.3.0" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/test/balanced.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/test/balanced.js new file mode 100644 index 0000000..f5e98e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/test/balanced.js @@ -0,0 +1,84 @@ +var test = require('tape'); +var balanced = require('..'); + +test('balanced', function(t) { + t.deepEqual(balanced('{', '}', 'pre{in{nest}}post'), { + start: 3, + end: 12, + pre: 'pre', + body: 'in{nest}', + post: 'post' + }); + t.deepEqual(balanced('{', '}', '{{{{{{{{{in}post'), { + start: 8, + end: 11, + pre: '{{{{{{{{', + body: 'in', + post: 'post' + }); + t.deepEqual(balanced('{', '}', 'pre{body{in}post'), { + start: 8, + end: 11, + pre: 'pre{body', + body: 'in', + post: 'post' + }); + t.deepEqual(balanced('{', '}', 'pre}{in{nest}}post'), { + start: 4, + end: 13, + pre: 'pre}', + body: 'in{nest}', + post: 'post' + }); + t.deepEqual(balanced('{', '}', 'pre{body}between{body2}post'), { + start: 3, + end: 8, + pre: 'pre', + body: 'body', + post: 'between{body2}post' + }); + t.notOk(balanced('{', '}', 'nope'), 'should be notOk'); + t.deepEqual(balanced('', '', 'preinnestpost'), { + start: 3, + end: 19, + pre: 'pre', + body: 'innest', + post: 'post' + }); + t.deepEqual(balanced('', '', 'preinnestpost'), { + start: 7, + end: 23, + pre: 'pre', + body: 'innest', + post: 'post' + }); + t.deepEqual(balanced('{{', '}}', 'pre{{{in}}}post'), { + start: 3, + end: 9, + pre: 'pre', + body: '{in}', + post: 'post' + }); + t.deepEqual(balanced('{{{', '}}', 'pre{{{in}}}post'), { + start: 3, + end: 8, + pre: 'pre', + body: 'in', + post: '}post' + }); + t.deepEqual(balanced('{', '}', 'pre{{first}in{second}post'), { + start: 4, + end: 10, + pre: 'pre{', + body: 'first', + post: 'in{second}post' + }); + t.deepEqual(balanced('', 'prepost'), { + start: 3, + end: 4, + pre: 'pre', + body: '', + post: 'post' + }); + t.end(); +}); 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..4b30e7d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + "base64-js@0.0.8", + "/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": { + "email": "feross@feross.org", + "name": "feross" + }, + "_npmVersion": "2.1.16", + "_phantomChildren": {}, + "_requested": { + "name": "base64-js", + "raw": "base64-js@0.0.8", + "rawSpec": "0.0.8", + "scope": null, + "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": { + "email": "t.jameson.little@gmail.com", + "name": "T. Jameson Little" + }, + "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": "http://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": { + "browsers": [ + "chrome/4..latest", + "firefox/3..latest", + "ie/6..latest", + "ipad/6", + "iphone/6", + "opera/11.0..latest", + "safari/5.1..latest" + ], + "files": "test/*.js" + }, + "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..8c06143 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/BigInteger.js @@ -0,0 +1,1189 @@ +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 BigInteger(value, sign) { + this.value = value; + this.sign = sign; + this.isSmall = false; + } + + function SmallInteger(value) { + this.value = value; + this.sign = value < 0; + this.isSmall = true; + } + + 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 CACHE[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 CACHE[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 [CACHE[0], self]; + } + if (n.isSmall) { + if (b === 1) return [self, CACHE[0]]; + if (b == -1) return [self.negate(), CACHE[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 [CACHE[0], self]; + if (comparison === 0) return [CACHE[self.sign === n.sign ? 1 : -1], CACHE[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 CACHE[1]; + if (a === 0) return CACHE[0]; + if (a === 1) return CACHE[1]; + if (a === -1) return n.isEven() ? CACHE[1] : CACHE[-1]; + if (n.sign) { + return CACHE[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 = CACHE[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 = CACHE[1], + base = this.mod(mod); + while (exp.isPositive()) { + if (base.isZero()) return CACHE[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(CACHE[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(CACHE[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.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 = CACHE[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 = CACHE[0], pow = CACHE[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: " + text.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)) 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] + var CACHE = function (v, radix) { + if (typeof v === "undefined") return CACHE[0]; + if (typeof radix !== "undefined") return +radix === 10 ? parseValue(v) : parseBase(v, radix); + return parseValue(v); + }; + for (var i = 0; i < 1000; i++) { + CACHE[i] = new SmallInteger(i); + if (i > 0) CACHE[-i] = new SmallInteger(-i); + } + // Backwards compatibility + CACHE.one = CACHE[1]; + CACHE.zero = CACHE[0]; + CACHE.minusOne = CACHE[-1]; + CACHE.max = max; + CACHE.min = min; + CACHE.gcd = gcd; + CACHE.lcm = lcm; + CACHE.isInstance = function (x) { return x instanceof BigInteger || x instanceof SmallInteger; }; + CACHE.randBetween = randBetween; + return CACHE; +})(); + +// 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..53480ea --- /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){this.value=e,this.sign=t,this.isSmall=!1}function u(e){this.value=e,this.sign=e<0,this.isSmall=!0}function a(e){return-r0?Math.floor(e):Math.ceil(e)}function d(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 v(e,t){return e.length>=t.length?d(e,t):d(t,e)}function m(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 g(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=g(e,t):(r=g(t,e),n=!n),r=l(r),typeof r=="number"?(n&&(r=-r),new u(r)):new o(r,n)}function b(e,n,r){var i=e.length,s=new Array(i),a=-n,f=t,c,h;for(c=0;c0)i[a++]=o%s,o=Math.floor(o/s);return i}function S(e,t){var n=[];while(t-->0)n.push(0);return n.concat(e)}function x(e,t){var n=Math.max(e.length,t.length);if(n<=30)return w(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=x(i,o),a=x(r,s),f=x(v(i,r),v(o,s)),l=v(v(u,S(g(g(f,u),a),n)),S(a,2*n));return c(l),l}function T(e,t){return-0.012*e-.012*t+15e-6*e*t>0}function N(e,n,r){return e=0;d--){p=s-1,f[d+i]!==u&&(p=Math.floor((f[d+i]*s+f[d+i-1])/u)),v=0,m=0,y=c.length;for(g=0;gi&&(c=(c+1)*u),a=Math.ceil(c/h);do{p=E(n,a);if(M(p,o)<=0)break;a--}while(a);s.push(a),o=g(o,p)}return s.reverse(),[l(s),l(o)]}function A(e,n){var r=e.length,i=h(r),s=t,o,u,a,f;a=0;for(o=r-1;o>=0;--o)f=a*s+e[o],u=p(f/n),a=f-u*n,i[o]=u|0;return[i,a|0]}function O(e,n){var r,i=G(n),s=e.value,a=i.value,c;if(a===0)throw new Error("Cannot divide by zero");if(e.isSmall)return i.isSmall?[new u(p(s/a)),new u(s%a)]:[Y[0],e];if(i.isSmall){if(a===1)return[e,Y[0]];if(a==-1)return[e.negate(),Y[0]];var h=Math.abs(a);if(ht.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 _(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 B(e){return(typeof e=="number"||typeof e=="string")&&+Math.abs(e)<=t||e instanceof o&&e.value.length<=1}function j(e,t,n){t=G(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 d=c?s.value[h]:t,v=p(Math.random()*d);f.unshift(v),v"}function J(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($(o))}return r.push($(i)),n+r.reverse().join("")}function K(e){if(a(+e)){var t=+e;if(t===p(t))return new u(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: "+f.join("e"));if(i.length===2){var s=i[1];s[0]==="+"&&(s=s.slice(1)),s=+s;if(s!==p(s)||!a(s))throw new Error("Invalid integer: "+s+" is not a valid exponent.");var f=i[0],l=f.indexOf(".");l>=0&&(s-=f.length-l-1,f=f.slice(0,l)+f.slice(l+1));if(s<0)throw new Error("Cannot include negative exponent part for integers");f+=(new Array(s+1)).join("0"),e=f}var h=/^([0-9][0-9]*)$/.test(e);if(!h)throw new Error("Invalid integer: "+e);var d=[],v=e.length,m=n,g=v-m;while(v>0)d.push(+e.slice(g,v)),g-=m,g<0&&(g=0),v-=m;return c(d),new o(d,r)}function Q(e){return a(e)?new u(e):K(e.toString())}function G(e){return typeof e=="number"?Q(e):typeof e=="string"?K(e):e}var t=1e7,n=7,r=9007199254740992,i=f(r),s=Math.log(r);o.prototype.add=function(e){var t,n=G(e);if(this.sign!==n.sign)return this.subtract(n.negate());var r=this.value,i=n.value;return n.isSmall?new o(m(r,Math.abs(i)),this.sign):new o(v(r,i),this.sign)},o.prototype.plus=o.prototype.add,u.prototype.add=function(e){var t=G(e),n=this.value;if(n<0!==t.sign)return this.subtract(t.negate());var r=t.value;if(t.isSmall){if(a(n+r))return new u(n+r);r=f(Math.abs(r))}return new o(m(r,Math.abs(n)),n<0)},u.prototype.plus=u.prototype.add,o.prototype.subtract=function(e){var t=G(e);if(this.sign!==t.sign)return this.add(t.negate());var n=this.value,r=t.value;return t.isSmall?b(n,Math.abs(r),this.sign):y(n,r,this.sign)},o.prototype.minus=o.prototype.subtract,u.prototype.subtract=function(e){var t=G(e),n=this.value;if(n<0!==t.sign)return this.add(t.negate());var r=t.value;return t.isSmall?new u(n-r):b(r,Math.abs(n),n>=0)},u.prototype.minus=u.prototype.subtract,o.prototype.negate=function(){return new o(this.value,!this.sign)},u.prototype.negate=function(){var e=this.sign,t=new u(-this.value);return t.sign=!e,t},o.prototype.abs=function(){return new o(this.value,!1)},u.prototype.abs=function(){return new u(Math.abs(this.value))},o.prototype.multiply=function(e){var n,r=G(e),i=this.value,s=r.value,u=this.sign!==r.sign,a;if(r.isSmall){if(s===0)return Y[0];if(s===1)return this;if(s===-1)return this.negate();a=Math.abs(s);if(ar?1:-1):-1},o.prototype.compare=function(e){if(e===Infinity)return-1;if(e===-Infinity)return 1;var t=G(e),n=this.value,r=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:M(n,r)*(this.sign?-1:1)},o.prototype.compareTo=o.prototype.compare,u.prototype.compare=function(e){if(e===Infinity)return-1;if(e===-Infinity)return 1;var t=G(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},u.prototype.compareTo=u.prototype.compare,o.prototype.equals=function(e){return this.compare(e)===0},u.prototype.eq=u.prototype.equals=o.prototype.eq=o.prototype.equals,o.prototype.notEquals=function(e){return this.compare(e)!==0},u.prototype.neq=u.prototype.notEquals=o.prototype.neq=o.prototype.notEquals,o.prototype.greater=function(e){return this.compare(e)>0},u.prototype.gt=u.prototype.greater=o.prototype.gt=o.prototype.greater,o.prototype.lesser=function(e){return this.compare(e)<0},u.prototype.lt=u.prototype.lesser=o.prototype.lt=o.prototype.lesser,o.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},u.prototype.geq=u.prototype.greaterOrEquals=o.prototype.geq=o.prototype.greaterOrEquals,o.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},u.prototype.leq=u.prototype.lesserOrEquals=o.prototype.leq=o.prototype.lesserOrEquals,o.prototype.isEven=function(){return(this.value[0]&1)===0},u.prototype.isEven=function(){return(this.value&1)===0},o.prototype.isOdd=function(){return(this.value[0]&1)===1},u.prototype.isOdd=function(){return(this.value&1)===1},o.prototype.isPositive=function(){return!this.sign},u.prototype.isPositive=function(){return this.value>0},o.prototype.isNegative=function(){return this.sign},u.prototype.isNegative=function(){return this.value<0},o.prototype.isUnit=function(){return!1},u.prototype.isUnit=function(){return Math.abs(this.value)===1},o.prototype.isZero=function(){return!1},u.prototype.isZero=function(){return this.value===0},o.prototype.isDivisibleBy=function(e){var t=G(e),n=t.value;return n===0?!1:n===1?!0:n===2?this.isEven():this.mod(t).equals(Y[0])},u.prototype.isDivisibleBy=o.prototype.isDivisibleBy,o.prototype.isPrime=function(){var t=_(this);if(t!==e)return t;var n=this.abs(),r=n.prev(),i=[2,3,5,7,11,13,17,19],s=r,o,u,a,f;while(s.isEven())s=s.divide(2);for(a=0;a-r?new u(e-1):new o(i,!0)};var D=[1];while(D[D.length-1]<=t)D.push(2*D[D.length-1]);var P=D.length,H=D[P-1];o.prototype.shiftLeft=function(e){if(!B(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>=P)t=t.multiply(H),e-=P-1;return t.multiply(D[e])},u.prototype.shiftLeft=o.prototype.shiftLeft,o.prototype.shiftRight=function(e){var t;if(!B(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>=P){if(n.isZero())return n;t=O(n,H),n=t[1].isNegative()?t[0].prev():t[0],e-=P-1}return t=O(n,D[e]),t[1].isNegative()?t[0].prev():t[0]},u.prototype.shiftRight=o.prototype.shiftRight,o.prototype.not=function(){return this.negate().prev()},u.prototype.not=o.prototype.not,o.prototype.and=function(e){return j(this,e,function(e,t){return e&t})},u.prototype.and=o.prototype.and,o.prototype.or=function(e){return j(this,e,function(e,t){return e|t})},u.prototype.or=o.prototype.or,o.prototype.xor=function(e){return j(this,e,function(e,t){return e^t})},u.prototype.xor=o.prototype.xor;var F=1<<30,I=(t&-t)*(t&-t)|F,V=function(e,t){var n=Y[0],r=Y[1],i=e.length;if(2<=t&&t<=36&&i<=s/Math.log(t))return new u(parseInt(e,t));t=G(t);var o=[],a,f=e[0]==="-";for(a=f?1:0;a");o.push(G(e.slice(h+1,a)))}}o.reverse();for(a=0;a=0)o=String(n[r]),i+=s.slice(o.length)+o;var u=this.sign?"-":"";return u+i},u.prototype.toString=function(t){return t===e&&(t=10),t!=10?J(this,t):String(this.value)},o.prototype.valueOf=function(){return+this.toString()},o.prototype.toJSNumber=o.prototype.valueOf,u.prototype.valueOf=function(){return this.value},u.prototype.toJSNumber=u.prototype.valueOf;var Y=function(e,t){return typeof e=="undefined"?Y[0]:typeof t!="undefined"?+t===10?G(e):V(e,t):G(e)};for(var Z=0;Z<1e3;Z++)Y[Z]=new u(Z),Z>0&&(Y[-Z]=new u(-Z));return Y.one=Y[1],Y.zero=Y[0],Y.minusOne=Y[-1],Y.max=R,Y.min=U,Y.gcd=z,Y.lcm=W,Y.isInstance=function(e){return e instanceof o||e instanceof u},Y.randBetween=X,Y}();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..6d9ee85 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/README.md @@ -0,0 +1,506 @@ +# 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) + +#### `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/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..f51a9b6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + "big-integer@^1.6.7", + "/Users/steveng/repo/cordova/cordova-android/node_modules/bplist-parser" + ] + ], + "_from": "big-integer@>=1.6.7 <2.0.0", + "_id": "big-integer@1.6.12", + "_inCache": true, + "_installable": true, + "_location": "/big-integer", + "_nodeVersion": "0.12.3", + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/big-integer-1.6.12.tgz_1455702804335_0.11810904298909009" + }, + "_npmUser": { + "email": "peter.e.c.olson+npm@gmail.com", + "name": "peterolson" + }, + "_npmVersion": "2.9.1", + "_phantomChildren": {}, + "_requested": { + "name": "big-integer", + "raw": "big-integer@^1.6.7", + "rawSpec": "^1.6.7", + "scope": null, + "spec": ">=1.6.7 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/bplist-parser" + ], + "_resolved": "http://registry.npmjs.org/big-integer/-/big-integer-1.6.12.tgz", + "_shasum": "39afcddafcd5c4480864efb757337d508938bb26", + "_shrinkwrap": null, + "_spec": "big-integer@^1.6.7", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/bplist-parser", + "author": { + "email": "peter.e.c.olson+npm@gmail.com", + "name": "Peter Olson" + }, + "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": "39afcddafcd5c4480864efb757337d508938bb26", + "tarball": "http://registry.npmjs.org/big-integer/-/big-integer-1.6.12.tgz" + }, + "engines": { + "node": ">=0.6" + }, + "gitHead": "56f449108e31542f939e701f1fe562a46e6c1fab", + "homepage": "https://github.com/peterolson/BigInteger.js#readme", + "keywords": [ + "arbitrary", + "arithmetic", + "big", + "bigint", + "biginteger", + "bignum", + "integer", + "math", + "precision" + ], + "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.12" +} 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..899b577 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + "bplist-parser@^0.1.0", + "/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": { + "email": "joe@fernsroth.com", + "name": "joeferner" + }, + "_npmVersion": "3.4.0", + "_phantomChildren": {}, + "_requested": { + "name": "bplist-parser", + "raw": "bplist-parser@^0.1.0", + "rawSpec": "^0.1.0", + "scope": null, + "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": { + "email": "joe.ferner@nearinfinity.com", + "name": "Joe Ferner" + }, + "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": "http://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz" + }, + "gitHead": "c4f22650de2cc95edd21a6e609ff0654a2b951bd", + "homepage": "https://github.com/nearinfinity/node-bplist-parser#readme", + "keywords": [ + "bplist", + "parser", + "plist" + ], + "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/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/.npmignore new file mode 100644 index 0000000..353546a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/.npmignore @@ -0,0 +1,3 @@ +test +.gitignore +.travis.yml 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/example.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/example.js new file mode 100644 index 0000000..60ecfc7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/example.js @@ -0,0 +1,8 @@ +var expand = require('./'); + +console.log(expand('http://any.org/archive{1996..1999}/vol{1..4}/part{a,b,c}.html')); +console.log(expand('http://www.numericals.com/file{1..100..10}.txt')); +console.log(expand('http://www.letters.com/file{a..z..2}.txt')); +console.log(expand('mkdir /usr/local/src/bash/{old,new,dist,bugs}')); +console.log(expand('chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}')); + 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..932718f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/index.js @@ -0,0 +1,191 @@ +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 []; + + 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..d6d2f78 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + "brace-expansion@^1.0.0", + "/Users/steveng/repo/cordova/cordova-android/node_modules/minimatch" + ] + ], + "_from": "brace-expansion@>=1.0.0 <2.0.0", + "_id": "brace-expansion@1.1.3", + "_inCache": true, + "_installable": true, + "_location": "/brace-expansion", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/brace-expansion-1.1.3.tgz_1455216688668_0.948847763473168" + }, + "_npmUser": { + "email": "julian@juliangruber.com", + "name": "juliangruber" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "name": "brace-expansion", + "raw": "brace-expansion@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/minimatch" + ], + "_resolved": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.3.tgz", + "_shasum": "46bff50115d47fc9ab89854abb87d98078a10991", + "_shrinkwrap": null, + "_spec": "brace-expansion@^1.0.0", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/minimatch", + "author": { + "email": "mail@juliangruber.com", + "name": "Julian Gruber", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/brace-expansion/issues" + }, + "dependencies": { + "balanced-match": "^0.3.0", + "concat-map": "0.0.1" + }, + "description": "Brace expansion as known from sh/bash", + "devDependencies": { + "tape": "4.4.0" + }, + "directories": {}, + "dist": { + "shasum": "46bff50115d47fc9ab89854abb87d98078a10991", + "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.3.tgz" + }, + "gitHead": "f0da1bb668e655f67b6b2d660c6e1c19e2a6f231", + "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": { + "browsers": [ + "android-browser/4.2..latest", + "chrome/25..latest", + "chrome/canary", + "firefox/20..latest", + "firefox/nightly", + "ie/8..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "opera/12..latest", + "opera/next", + "safari/5.1..latest" + ], + "files": "test/*.js" + }, + "version": "1.1.3" +} 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..3ebe787 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + "concat-map@0.0.1", + "/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": { + "email": "mail@substack.net", + "name": "substack" + }, + "_npmVersion": "1.3.21", + "_phantomChildren": {}, + "_requested": { + "name": "concat-map", + "raw": "concat-map@0.0.1", + "rawSpec": "0.0.1", + "scope": null, + "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": { + "email": "mail@substack.net", + "name": "James Halliday", + "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": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + }, + "homepage": "https://github.com/substack/node-concat-map", + "keywords": [ + "concat", + "concatMap", + "functional", + "higher-order", + "map" + ], + "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": { + "browsers": { + "chrome": [ + 10, + 22 + ], + "ff": [ + 10, + 15, + 3.5 + ], + "ie": [ + 6, + 7, + 8, + 9 + ], + "opera": [ + 12 + ], + "safari": [ + 5.1 + ] + }, + "files": "test/*.js" + }, + "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..6454481 --- /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: +``` +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: + +``` +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: +``` +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: +``` +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: +``` +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: +``` +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: +``` +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..e7db69c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/RELEASENOTES.md @@ -0,0 +1,42 @@ + +# Cordova-common Release Notes + +### 1.1.0 (Feb 16, 2016) +* CB-10482 Remove references to windows8 from cordova-lib/cli +* CB-10430 Adds forwardEvents method to easily connect two EventEmitters +* CB-10176 Adds CordovaLogger class, based on logger module from cordova-cli +* CB-10052 Expose child process' io streams via promise progress notification +* CB-10497 Prefer .bat over .cmd on windows platform +* CB-9984 Bumps plist version and fixes failing cordova-common test + +### 1.0.0 (Oct 29, 2015) + +* CB-9890 Documents cordova-common +* CB-9598 Correct cordova-lib -> cordova-common in README +* Pick ConfigParser changes from apache@0c3614e +* CB-9743 Removes system frameworks handling from ConfigChanges +* 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 Adds tests and fixtures based on existing cordova-lib ones +* 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..22e90a7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/cordova-common.js @@ -0,0 +1,43 @@ +/** + 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 */ + +// For now expose plugman and cordova just as they were in the old repos +exports = module.exports = { + events: require('./src/events'), + superspawn: require('./src/superspawn'), + + ActionStack: require('./src/ActionStack'), + CordovaError: require('./src/CordovaError/CordovaError'), + CordovaLogger: require('./src/CordovaLogger'), + CordovaExternalToolErrorContext: require('./src/CordovaError/CordovaExternalToolErrorContext'), + PlatformJson: require('./src/PlatformJson'), + ConfigParser: require('./src/ConfigParser/ConfigParser.js'), + + PluginInfo: require('./src/PluginInfo/PluginInfo.js'), + PluginInfoProvider: require('./src/PluginInfo/PluginInfoProvider.js'), + + ConfigChanges: require('./src/ConfigChanges/ConfigChanges.js'), + ConfigKeeper: require('./src/ConfigChanges/ConfigKeeper.js'), + ConfigFile: require('./src/ConfigChanges/ConfigFile.js'), + mungeUtil: require('./src/ConfigChanges/munge-util.js'), + + xmlHelpers: require('./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..4bd1675 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/package.json @@ -0,0 +1,119 @@ +{ + "_args": [ + [ + "cordova-common@^1.1.0", + "/Users/steveng/repo/cordova/cordova-android" + ] + ], + "_from": "cordova-common@>=1.1.0 <2.0.0", + "_id": "cordova-common@1.1.0", + "_inCache": true, + "_installable": true, + "_location": "/cordova-common", + "_nodeVersion": "4.2.3", + "_npmOperationalInternal": { + "host": "packages-5-east.internal.npmjs.com", + "tmp": "tmp/cordova-common-1.1.0.tgz_1455781889491_0.6937742941081524" + }, + "_npmUser": { + "email": "kotikov.vladimir@gmail.com", + "name": "kotikov.vladimir" + }, + "_npmVersion": "2.14.7", + "_phantomChildren": {}, + "_requested": { + "name": "cordova-common", + "raw": "cordova-common@^1.1.0", + "rawSpec": "^1.1.0", + "scope": null, + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "http://registry.npmjs.org/cordova-common/-/cordova-common-1.1.0.tgz", + "_shasum": "8682721466ee354747ec6241f34f412b7e0ef636", + "_shrinkwrap": null, + "_spec": "cordova-common@^1.1.0", + "_where": "/Users/steveng/repo/cordova/cordova-android", + "author": { + "name": "Apache Software Foundation" + }, + "bugs": { + "email": "dev@cordova.apache.org", + "url": "https://issues.apache.org/jira/browse/CB" + }, + "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", + "osenv": "^0.1.3", + "plist": "^1.2.0", + "q": "^1.4.1", + "semver": "^5.0.1", + "shelljs": "^0.5.1", + "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" + }, + "directories": {}, + "dist": { + "shasum": "8682721466ee354747ec6241f34f412b7e0ef636", + "tarball": "http://registry.npmjs.org/cordova-common/-/cordova-common-1.1.0.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.1.0" +} 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..a914fc8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js @@ -0,0 +1,323 @@ +/* + * + * 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'); + +var mungeutil = require('./munge-util'); + +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]; + + // get config munge, aka how did this plugin change various config files + var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars); + // 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) { + var self = this; + var platform_config = self.platformJson.root; + + // get config munge, aka how should this plugin change various config files + var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars); + // global munge looks at all plugins' 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]); + } + + // Move to installed/dependent_plugins + self.platformJson.addPlugin(pluginInfo.id, plugin_vars || {}, is_top_level); + 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 plugin.xml + vars +PlatformMunger.prototype.generate_plugin_config_munge = generate_plugin_config_munge; +function generate_plugin_config_munge(pluginInfo, vars) { + var self = this; + + vars = vars || {}; + var munge = { files: {} }; + var changes = pluginInfo.getConfigFiles(self.platform); + + // 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 + mungeutil.deep_add(munge, change.target, change.parent, { xml: stringified, count: 1, after: change.after }); + }); + }); + return munge; +} + +// 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); + }); + + // 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..dd9ebbc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js @@ -0,0 +1,208 @@ +/* + * 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 bplist = require('bplist-parser'); +var et = require('elementtree'); +var glob = require('glob'); +var plist = require('plist'); + +var plist_helpers = require('../util/plist-helpers'); +var xml_helpers = require('../util/xml-helpers'); + +/****************************************************************************** +* 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 = 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) ? + bplist.parseBuffer(fs.readFileSync(filepath)) : + 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, 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 = [et.XML(xml_child.xml)]; + result = xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after); + if ( !result) { + throw new Error('grafting xml at selector "' + selector + '" from "' + filepath + '" during config install went bad :('); + } + } else { + // plist file + result = plist_helpers.graftPLIST(self.data, xml_child.xml, selector); + if ( !result ) { + throw new Error('grafting to plist "' + filepath + '" during config install went bad :('); + } + } + 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 = [et.XML(xml_child.xml)]; + result = xml_helpers.pruneXML(self.data, xml_to_graft, selector); + } else { + // plist file + result = 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 = 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 = glob.sync(path.join(project_dir, '**', 'config.xml')); + if (matches.length) filepath = matches[0]; + } + return filepath; + } + + // 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 = 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..307b3c1 --- /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,160 @@ +/* + * 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) { + 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..7abddf6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigParser/ConfigParser.js @@ -0,0 +1,499 @@ +/** + 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 = { + packageName: function(id) { + return this.doc.getroot().attrib['id']; + }, + setPackageName: function(id) { + this.doc.getroot().attrib['id'] = id; + }, + android_packageName: function() { + return this.doc.getroot().attrib['android-packageName']; + }, + android_activityName: function() { + return this.doc.getroot().attrib['android-activityName']; + }, + ios_CFBundleIdentifier: function() { + return this.doc.getroot().attrib['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.doc.getroot().attrib['version']; + }, + windows_packageVersion: function() { + return this.doc.getroot().attrib('windows-packageVersion'); + }, + android_versionCode: function() { + return this.doc.getroot().attrib['android-versionCode']; + }, + ios_CFBundleVersion: function() { + return this.doc.getroot().attrib['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.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 */ + return { + 'origin': access.attrib.origin, + 'minimum_tls_version': minimum_tls_version, + 'requires_forward_secrecy' : requires_forward_secrecy + }; + }); + }, + /* 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 */ + return { + 'href': allow_navigation.attrib.href, + 'minimum_tls_version': minimum_tls_version, + 'requires_forward_secrecy' : requires_forward_secrecy + }; + }); + }, + 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/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..06dbcf3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/CordovaLogger.js @@ -0,0 +1,203 @@ +/* + 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; +}; + +/** + * 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(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/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..793e976 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/PlatformJson.js @@ -0,0 +1,155 @@ +/* + * 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; +}; + +PlatformJson.prototype.removePlugin = function(pluginId, isTopLevel) { + var pluginsList = isTopLevel ? + this.root.installed_plugins : + this.root.dependent_plugins; + + delete pluginsList[pluginId]; + + return this; +}; + +PlatformJson.prototype.addInstalledPluginToPrepareQueue = function(pluginDirName, vars, is_top_level) { + this.root.prepare_queue.installed.push({'plugin':pluginDirName, 'vars':vars, 'topLevel':is_top_level}); +}; + +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; +}; + +// 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; +} + +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..2554a3c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfo.js @@ -0,0 +1,410 @@ +/** + 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. + self.getPreferences = getPreferences; + function getPreferences(platform) { + var arprefs = _getTags(self._et, 'preference', platform, _parsePreference); + + var prefs= {}; + for(var i in arprefs) + { + var pref=arprefs[i]; + prefs[pref.preference]=pref.default; + } + // returns { key : default | null} + return prefs; + } + + 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; + } + + // 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, + 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 platfrom 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/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..868d363 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/events.js @@ -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. +*/ + +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 could be redirected to another EventEmitter instance only'); + + EVENTS_RECEIVER = eventEmitter; +}; + +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/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..8b02989 --- /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,266 @@ +/* + * + * 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') + ; + +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; + } + + var oneAttribKeys = Object.keys(one.attrib), + twoAttribKeys = Object.keys(two.attrib), + i = 0, attribName; + + if (oneAttribKeys.length != twoAttribKeys.length) { + return false; + } + + for (i; i < oneAttribKeys.length; i++) { + attribName = oneAttribKeys[i]; + + if (one.attrib[attribName] != two.attrib[attribName]) { + return false; + } + } + + for (i; 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 = 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 = 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; + }, + + // removes node from doc at selector + pruneXML: function(doc, nodes, selector) { + var parent = 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; + }, + + 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)); + } +}; + +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; + } +} + +var ROOT = /^\/([^\/]*)/, + ABSOLUTE = /^\/([^\/]*)\/(.*)/; + +function resolveParent(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; +} + +// 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']; +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 platform + if (platform) { + src.findall('platform[@name="' + platform + '"]').forEach(function (platformElement) { + platformElement.getchildren().forEach(mergeChild); + }); + } + + //Handle children + src.getchildren().forEach(mergeChild); + + function mergeChild (srcChild) { + var srcTag = srcChild.tag, + destChild = new et.Element(srcTag), + foundChild, + query = srcTag + '', + shouldMerge = true; + + if (BLACKLIST.indexOf(srcTag) === -1) { + 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 + Object.getOwnPropertyNames(srcChild.attrib).forEach(function (attribute) { + query += '[@' + attribute + '="' + srcChild.attrib[attribute] + '"]'; + }); + var foundChildren = dest.findall(query); + for(var i = 0; i < foundChildren.length; i++) { + foundChild = foundChildren[i]; + if (foundChild && textMatch(srcChild, foundChild) && (Object.keys(srcChild.attrib).length==Object.keys(foundChild.attrib).length)) { + destChild = foundChild; + dest.remove(destChild); + shouldMerge = false; + break; + } + } + } + + mergeXml(srcChild, destChild, platform, clobber && shouldMerge); + dest.append(destChild); + } + } +} + +// 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); +} 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..989efad --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/package.json @@ -0,0 +1,77 @@ +{ + "_args": [ + [ + "cordova-registry-mapper@^1.1.8", + "/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": { + "email": "stevengill97@gmail.com", + "name": "stevegill" + }, + "_npmVersion": "3.5.3", + "_phantomChildren": {}, + "_requested": { + "name": "cordova-registry-mapper", + "raw": "cordova-registry-mapper@^1.1.8", + "rawSpec": "^1.1.8", + "scope": null, + "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": "http://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..f1a5f14 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + "elementtree@^0.1.6", + "/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": { + "email": "ryan@trolocsis.com", + "name": "rphillips" + }, + "_npmVersion": "1.3.24", + "_phantomChildren": {}, + "_requested": { + "name": "elementtree", + "raw": "elementtree@^0.1.6", + "rawSpec": "^0.1.6", + "scope": null, + "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": "http://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz" + }, + "engines": { + "node": ">= 0.4.0" + }, + "homepage": "https://github.com/racker/node-elementtree", + "keywords": [ + "elementtree", + "parser", + "sax", + "seralization", + "xml" + ], + "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..7c398ae --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + "glob@^5.0.13", + "/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": { + "email": "isaacs@npmjs.com", + "name": "isaacs" + }, + "_npmVersion": "3.3.2", + "_phantomChildren": {}, + "_requested": { + "name": "glob", + "raw": "glob@^5.0.13", + "rawSpec": "^5.0.13", + "scope": null, + "spec": ">=5.0.13 <6.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_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": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "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": "http://registry.npmjs.org/glob/-/glob-5.0.15.tgz" + }, + "engines": { + "node": "*" + }, + "files": [ + "common.js", + "glob.js", + "sync.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/.eslintrc b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/.eslintrc new file mode 100644 index 0000000..b7a1550 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/.eslintrc @@ -0,0 +1,17 @@ +{ + "env" : { + "node" : true + }, + "rules" : { + "semi": [2, "never"], + "strict": 0, + "quotes": [1, "single", "avoid-escape"], + "no-use-before-define": 0, + "curly": 0, + "no-underscore-dangle": 0, + "no-lonely-if": 1, + "no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}], + "no-mixed-requires": 0, + "space-infix-ops": 0 + } +} 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..8bc96cb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/inflight.js @@ -0,0 +1,44 @@ +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) + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + 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..3bc7cf7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "inflight@^1.0.4", + "/Users/steveng/repo/cordova/cordova-android/node_modules/glob" + ] + ], + "_from": "inflight@>=1.0.4 <2.0.0", + "_id": "inflight@1.0.4", + "_inCache": true, + "_installable": true, + "_location": "/inflight", + "_nodeVersion": "0.10.32", + "_npmUser": { + "email": "ogd@aoaioxxysz.net", + "name": "othiym23" + }, + "_npmVersion": "2.1.3", + "_phantomChildren": {}, + "_requested": { + "name": "inflight", + "raw": "inflight@^1.0.4", + "rawSpec": "^1.0.4", + "scope": null, + "spec": ">=1.0.4 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/glob" + ], + "_resolved": "http://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz", + "_shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", + "_shrinkwrap": null, + "_spec": "inflight@^1.0.4", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/glob", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "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": "^0.4.10" + }, + "directories": {}, + "dist": { + "shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", + "tarball": "http://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz" + }, + "gitHead": "c7b5531d572a867064d4a1da9e013e8910b7d1ba", + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC", + "main": "inflight.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "name": "inflight", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inflight.git" + }, + "scripts": { + "test": "tap test.js" + }, + "version": "1.0.4" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/test.js new file mode 100644 index 0000000..2bb75b3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/test.js @@ -0,0 +1,97 @@ +var test = require('tap').test +var inf = require('./inflight.js') + + +function req (key, cb) { + cb = inf(key, cb) + if (cb) setTimeout(function () { + cb(key) + cb(key) + }) + return cb +} + +test('basic', function (t) { + var calleda = false + var a = req('key', function (k) { + t.notOk(calleda) + calleda = true + t.equal(k, 'key') + if (calledb) t.end() + }) + t.ok(a, 'first returned cb function') + + var calledb = false + var b = req('key', function (k) { + t.notOk(calledb) + calledb = true + t.equal(k, 'key') + if (calleda) t.end() + }) + + t.notOk(b, 'second should get falsey inflight response') +}) + +test('timing', function (t) { + var expect = [ + 'method one', + 'start one', + 'end one', + 'two', + 'tick', + 'three' + ] + var i = 0 + + function log (m) { + t.equal(m, expect[i], m + ' === ' + expect[i]) + ++i + if (i === expect.length) + t.end() + } + + function method (name, cb) { + log('method ' + name) + process.nextTick(cb) + } + + var one = inf('foo', function () { + log('start one') + var three = inf('foo', function () { + log('three') + }) + if (three) method('three', three) + log('end one') + }) + + method('one', one) + + var two = inf('foo', function () { + log('two') + }) + if (two) method('one', two) + + process.nextTick(log.bind(null, 'tick')) +}) + +test('parameters', function (t) { + t.plan(8) + + var a = inf('key', function (first, second, third) { + t.equal(first, 1) + t.equal(second, 2) + t.equal(third, 3) + }) + t.ok(a, 'first returned cb function') + + var b = inf('key', function (first, second, third) { + t.equal(first, 1) + t.equal(second, 2) + t.equal(third, 3) + }) + t.notOk(b, 'second should get falsey inflight response') + + setTimeout(function () { + a(1, 2, 3) + }) +}) 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..29f5e24 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/inherits.js @@ -0,0 +1 @@ +module.exports = require('util').inherits 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..6313b8e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/package.json @@ -0,0 +1,77 @@ +{ + "_args": [ + [ + "inherits@2", + "/Users/steveng/repo/cordova/cordova-android/node_modules/glob" + ] + ], + "_from": "inherits@>=2.0.0 <3.0.0", + "_id": "inherits@2.0.1", + "_inCache": true, + "_installable": true, + "_location": "/inherits", + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "1.3.8", + "_phantomChildren": {}, + "_requested": { + "name": "inherits", + "raw": "inherits@2", + "rawSpec": "2", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/glob" + ], + "_resolved": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "_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": {}, + "directories": {}, + "dist": { + "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "homepage": "https://github.com/isaacs/inherits#readme", + "keywords": [ + "browser", + "browserify", + "class", + "inheritance", + "inherits", + "klass", + "object-oriented", + "oop" + ], + "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.1" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/test.js new file mode 100644 index 0000000..fc53012 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/test.js @@ -0,0 +1,25 @@ +var inherits = require('./inherits.js') +var assert = require('assert') + +function test(c) { + assert(c.constructor === Child) + assert(c.constructor.super_ === Parent) + assert(Object.getPrototypeOf(c) === Child.prototype) + assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) + assert(c instanceof Child) + assert(c instanceof Parent) +} + +function Child() { + Parent.call(this) + test(this) +} + +function Parent() {} + +inherits(Child, Parent) + +var c = new Child +test(c) + +console.log('ok') 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..dddb405 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/plist/package.json @@ -0,0 +1,117 @@ +{ + "_args": [ + [ + "plist@^1.2.0", + "/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": { + "email": "reinstein.mike@gmail.com", + "name": "mreinstein" + }, + "_npmVersion": "3.3.11", + "_phantomChildren": {}, + "_requested": { + "name": "plist", + "raw": "plist@^1.2.0", + "rawSpec": "^1.2.0", + "scope": null, + "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": { + "email": "nathan@tootallnate.net", + "name": "Nathan Rajlich" + }, + "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": "http://registry.npmjs.org/plist/-/plist-1.2.0.tgz" + }, + "gitHead": "69520574f27864145192338b72e608fbe1bda6f7", + "homepage": "https://github.com/TooTallNate/node-plist#readme", + "keywords": [ + "apple", + "browser", + "mac", + "parser", + "plist", + "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..b089b27 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/package.json @@ -0,0 +1,73 @@ +{ + "_args": [ + [ + "properties-parser@^0.2.3", + "/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": { + "email": "xavi.rmz@gmail.com", + "name": "xavi" + }, + "_npmVersion": "1.3.23", + "_phantomChildren": {}, + "_requested": { + "name": "properties-parser", + "raw": "properties-parser@^0.2.3", + "rawSpec": "^0.2.3", + "scope": null, + "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": "http://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": [ + ".properties", + "actionscript", + "file parser", + "java", + "parser", + "properties" + ], + "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/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/.npmignore new file mode 100644 index 0000000..534108e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/.npmignore @@ -0,0 +1,4 @@ +node_modules/ +coverage/ +.nyc_output/ +nyc_output/ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/.travis.yml new file mode 100644 index 0000000..991d04b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - '0.10' + - '0.12' + - 'iojs' 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..0b14a7e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/README.md @@ -0,0 +1,327 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Usage + + $ npm install 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 + + Usage: semver [ [...]] [-r | -i | --preid | -l | -rv] + Test if version(s) satisfy the supplied range(s), and sort them. + + Multiple versions or ranges may be supplied, unless increment + option is specified. In that case, only a single version may + be used, and it is incremented by the specified level + + Program exits successfully if any valid version satisfies + all supplied ranges, and prints all satisfying versions. + + If no versions are valid, or ranges are not satisfied, + 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. +* `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. +* `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..0db0065 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/package.json @@ -0,0 +1,77 @@ +{ + "_args": [ + [ + "semver@^5.0.1", + "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + ] + ], + "_from": "semver@>=5.0.1 <6.0.0", + "_id": "semver@5.1.0", + "_inCache": true, + "_installable": true, + "_location": "/semver", + "_nodeVersion": "4.0.0", + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "3.3.2", + "_phantomChildren": {}, + "_requested": { + "name": "semver", + "raw": "semver@^5.0.1", + "rawSpec": "^5.0.1", + "scope": null, + "spec": ">=5.0.1 <6.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "http://registry.npmjs.org/semver/-/semver-5.1.0.tgz", + "_shasum": "85f2cf8550465c4df000cf7d86f6b054106ab9e5", + "_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": "85f2cf8550465c4df000cf7d86f6b054106ab9e5", + "tarball": "http://registry.npmjs.org/semver/-/semver-5.1.0.tgz" + }, + "gitHead": "8e33a30e62e40e4983d1c5f55e794331b861aadc", + "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.1.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..000df92 --- /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..71795f6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/semver.js @@ -0,0 +1,1188 @@ +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.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; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/big-numbers.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/big-numbers.js new file mode 100644 index 0000000..c051864 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/big-numbers.js @@ -0,0 +1,31 @@ +var test = require('tap').test +var semver = require('../') + +test('long version is too long', function (t) { + var v = '1.2.' + new Array(256).join('1') + t.throws(function () { + new semver.SemVer(v) + }) + t.equal(semver.valid(v, false), null) + t.equal(semver.valid(v, true), null) + t.equal(semver.inc(v, 'patch'), null) + t.end() +}) + +test('big number is like too long version', function (t) { + var v = '1.2.' + new Array(100).join('1') + t.throws(function () { + new semver.SemVer(v) + }) + t.equal(semver.valid(v, false), null) + t.equal(semver.valid(v, true), null) + t.equal(semver.inc(v, 'patch'), null) + t.end() +}) + +test('parsing null does not throw', function (t) { + t.equal(semver.parse(null), null) + t.equal(semver.parse({}), null) + t.equal(semver.parse(new semver.SemVer('1.2.3')).version, '1.2.3') + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/clean.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/clean.js new file mode 100644 index 0000000..9e268de --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/clean.js @@ -0,0 +1,29 @@ +var tap = require('tap'); +var test = tap.test; +var semver = require('../semver.js'); +var clean = semver.clean; + +test('\nclean tests', function(t) { + // [range, version] + // Version should be detectable despite extra characters + [ + ['1.2.3', '1.2.3'], + [' 1.2.3 ', '1.2.3'], + [' 1.2.3-4 ', '1.2.3-4'], + [' 1.2.3-pre ', '1.2.3-pre'], + [' =v1.2.3 ', '1.2.3'], + ['v1.2.3', '1.2.3'], + [' v1.2.3 ', '1.2.3'], + ['\t1.2.3', '1.2.3'], + ['>1.2.3', null], + ['~1.2.3', null], + ['<=1.2.3', null], + ['1.2.x', null] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var msg = 'clean(' + range + ') = ' + version; + t.equal(clean(range), version, msg); + }); + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/gtr.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/gtr.js new file mode 100644 index 0000000..bbb8789 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/gtr.js @@ -0,0 +1,173 @@ +var tap = require('tap'); +var test = tap.test; +var semver = require('../semver.js'); +var gtr = semver.gtr; + +test('\ngtr tests', function(t) { + // [range, version, loose] + // Version should be greater than range + [ + ['~1.2.2', '1.3.0'], + ['~0.6.1-1', '0.7.1-1'], + ['1.0.0 - 2.0.0', '2.0.1'], + ['1.0.0', '1.0.1-beta1'], + ['1.0.0', '2.0.0'], + ['<=2.0.0', '2.1.1'], + ['<=2.0.0', '3.2.9'], + ['<2.0.0', '2.0.0'], + ['0.1.20 || 1.2.4', '1.2.5'], + ['2.x.x', '3.0.0'], + ['1.2.x', '1.3.0'], + ['1.2.x || 2.x', '3.0.0'], + ['2.*.*', '5.0.1'], + ['1.2.*', '1.3.3'], + ['1.2.* || 2.*', '4.0.0'], + ['2', '3.0.0'], + ['2.3', '2.4.2'], + ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0 + ['~2.4', '2.5.5'], + ['~>3.2.1', '3.3.0'], // >=3.2.1 <3.3.0 + ['~1', '2.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '2.2.4'], + ['~> 1', '3.2.3'], + ['~1.0', '1.1.2'], // >=1.0.0 <1.1.0 + ['~ 1.0', '1.1.0'], + ['<1.2', '1.2.0'], + ['< 1.2', '1.2.1'], + ['1', '2.0.0beta', true], + ['~v0.5.4-pre', '0.6.0'], + ['~v0.5.4-pre', '0.6.1-pre'], + ['=0.7.x', '0.8.0'], + ['=0.7.x', '0.8.0-asdf'], + ['<0.7.x', '0.7.0'], + ['~1.2.2', '1.3.0'], + ['1.0.0 - 2.0.0', '2.2.3'], + ['1.0.0', '1.0.1'], + ['<=2.0.0', '3.0.0'], + ['<=2.0.0', '2.9999.9999'], + ['<=2.0.0', '2.2.9'], + ['<2.0.0', '2.9999.9999'], + ['<2.0.0', '2.2.9'], + ['2.x.x', '3.1.3'], + ['1.2.x', '1.3.3'], + ['1.2.x || 2.x', '3.1.3'], + ['2.*.*', '3.1.3'], + ['1.2.*', '1.3.3'], + ['1.2.* || 2.*', '3.1.3'], + ['2', '3.1.2'], + ['2.3', '2.4.1'], + ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0 + ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0 + ['~1', '2.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '2.2.3'], + ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0 + ['<1', '1.0.0'], + ['1', '2.0.0beta', true], + ['<1', '1.0.0beta', true], + ['< 1', '1.0.0beta', true], + ['=0.7.x', '0.8.2'], + ['<0.7.x', '0.7.2'] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var loose = tuple[2] || false; + var msg = 'gtr(' + version + ', ' + range + ', ' + loose + ')'; + t.ok(gtr(version, range, loose), msg); + }); + t.end(); +}); + +test('\nnegative gtr tests', function(t) { + // [range, version, loose] + // Version should NOT be greater than range + [ + ['~0.6.1-1', '0.6.1-1'], + ['1.0.0 - 2.0.0', '1.2.3'], + ['1.0.0 - 2.0.0', '0.9.9'], + ['1.0.0', '1.0.0'], + ['>=*', '0.2.4'], + ['', '1.0.0', true], + ['*', '1.2.3'], + ['*', 'v1.2.3-foo'], + ['>=1.0.0', '1.0.0'], + ['>=1.0.0', '1.0.1'], + ['>=1.0.0', '1.1.0'], + ['>1.0.0', '1.0.1'], + ['>1.0.0', '1.1.0'], + ['<=2.0.0', '2.0.0'], + ['<=2.0.0', '1.9999.9999'], + ['<=2.0.0', '0.2.9'], + ['<2.0.0', '1.9999.9999'], + ['<2.0.0', '0.2.9'], + ['>= 1.0.0', '1.0.0'], + ['>= 1.0.0', '1.0.1'], + ['>= 1.0.0', '1.1.0'], + ['> 1.0.0', '1.0.1'], + ['> 1.0.0', '1.1.0'], + ['<= 2.0.0', '2.0.0'], + ['<= 2.0.0', '1.9999.9999'], + ['<= 2.0.0', '0.2.9'], + ['< 2.0.0', '1.9999.9999'], + ['<\t2.0.0', '0.2.9'], + ['>=0.1.97', 'v0.1.97'], + ['>=0.1.97', '0.1.97'], + ['0.1.20 || 1.2.4', '1.2.4'], + ['0.1.20 || >1.2.4', '1.2.4'], + ['0.1.20 || 1.2.4', '1.2.3'], + ['0.1.20 || 1.2.4', '0.1.20'], + ['>=0.2.3 || <0.0.1', '0.0.0'], + ['>=0.2.3 || <0.0.1', '0.2.3'], + ['>=0.2.3 || <0.0.1', '0.2.4'], + ['||', '1.3.4'], + ['2.x.x', '2.1.3'], + ['1.2.x', '1.2.3'], + ['1.2.x || 2.x', '2.1.3'], + ['1.2.x || 2.x', '1.2.3'], + ['x', '1.2.3'], + ['2.*.*', '2.1.3'], + ['1.2.*', '1.2.3'], + ['1.2.* || 2.*', '2.1.3'], + ['1.2.* || 2.*', '1.2.3'], + ['1.2.* || 2.*', '1.2.3'], + ['*', '1.2.3'], + ['2', '2.1.2'], + ['2.3', '2.3.1'], + ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0 + ['~2.4', '2.4.5'], + ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0 + ['~1', '1.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '1.2.3'], + ['~> 1', '1.2.3'], + ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0 + ['~ 1.0', '1.0.2'], + ['>=1', '1.0.0'], + ['>= 1', '1.0.0'], + ['<1.2', '1.1.1'], + ['< 1.2', '1.1.1'], + ['1', '1.0.0beta', true], + ['~v0.5.4-pre', '0.5.5'], + ['~v0.5.4-pre', '0.5.4'], + ['=0.7.x', '0.7.2'], + ['>=0.7.x', '0.7.2'], + ['=0.7.x', '0.7.0-asdf'], + ['>=0.7.x', '0.7.0-asdf'], + ['<=0.7.x', '0.6.2'], + ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'], + ['>=0.2.3 <=0.2.4', '0.2.4'], + ['1.0.0 - 2.0.0', '2.0.0'], + ['^1', '0.0.0-0'], + ['^3.0.0', '2.0.0'], + ['^1.0.0 || ~2.0.1', '2.0.0'], + ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'], + ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true], + ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true], + ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var loose = tuple[2] || false; + var msg = '!gtr(' + version + ', ' + range + ', ' + loose + ')'; + t.notOk(gtr(version, range, loose), msg); + }); + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/index.js new file mode 100644 index 0000000..47c3f5f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/index.js @@ -0,0 +1,698 @@ +'use strict'; + +var tap = require('tap'); +var test = tap.test; +var semver = require('../semver.js'); +var eq = semver.eq; +var gt = semver.gt; +var lt = semver.lt; +var neq = semver.neq; +var cmp = semver.cmp; +var gte = semver.gte; +var lte = semver.lte; +var satisfies = semver.satisfies; +var validRange = semver.validRange; +var inc = semver.inc; +var diff = semver.diff; +var replaceStars = semver.replaceStars; +var toComparators = semver.toComparators; +var SemVer = semver.SemVer; +var Range = semver.Range; + +test('\ncomparison tests', function(t) { + // [version1, version2] + // version1 should be greater than version2 + [['0.0.0', '0.0.0-foo'], + ['0.0.1', '0.0.0'], + ['1.0.0', '0.9.9'], + ['0.10.0', '0.9.0'], + ['0.99.0', '0.10.0'], + ['2.0.0', '1.2.3'], + ['v0.0.0', '0.0.0-foo', true], + ['v0.0.1', '0.0.0', true], + ['v1.0.0', '0.9.9', true], + ['v0.10.0', '0.9.0', true], + ['v0.99.0', '0.10.0', true], + ['v2.0.0', '1.2.3', true], + ['0.0.0', 'v0.0.0-foo', true], + ['0.0.1', 'v0.0.0', true], + ['1.0.0', 'v0.9.9', true], + ['0.10.0', 'v0.9.0', true], + ['0.99.0', 'v0.10.0', true], + ['2.0.0', 'v1.2.3', true], + ['1.2.3', '1.2.3-asdf'], + ['1.2.3', '1.2.3-4'], + ['1.2.3', '1.2.3-4-foo'], + ['1.2.3-5-foo', '1.2.3-5'], + ['1.2.3-5', '1.2.3-4'], + ['1.2.3-5-foo', '1.2.3-5-Foo'], + ['3.0.0', '2.7.2+asdf'], + ['1.2.3-a.10', '1.2.3-a.5'], + ['1.2.3-a.b', '1.2.3-a.5'], + ['1.2.3-a.b', '1.2.3-a'], + ['1.2.3-a.b.c.10.d.5', '1.2.3-a.b.c.5.d.100'], + ['1.2.3-r2', '1.2.3-r100'], + ['1.2.3-r100', '1.2.3-R2'] + ].forEach(function(v) { + var v0 = v[0]; + var v1 = v[1]; + var loose = v[2]; + t.ok(gt(v0, v1, loose), "gt('" + v0 + "', '" + v1 + "')"); + t.ok(lt(v1, v0, loose), "lt('" + v1 + "', '" + v0 + "')"); + t.ok(!gt(v1, v0, loose), "!gt('" + v1 + "', '" + v0 + "')"); + t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')"); + t.ok(eq(v0, v0, loose), "eq('" + v0 + "', '" + v0 + "')"); + t.ok(eq(v1, v1, loose), "eq('" + v1 + "', '" + v1 + "')"); + t.ok(neq(v0, v1, loose), "neq('" + v0 + "', '" + v1 + "')"); + t.ok(cmp(v1, '==', v1, loose), "cmp('" + v1 + "' == '" + v1 + "')"); + t.ok(cmp(v0, '>=', v1, loose), "cmp('" + v0 + "' >= '" + v1 + "')"); + t.ok(cmp(v1, '<=', v0, loose), "cmp('" + v1 + "' <= '" + v0 + "')"); + t.ok(cmp(v0, '!=', v1, loose), "cmp('" + v0 + "' != '" + v1 + "')"); + }); + t.end(); +}); + +test('\nequality tests', function(t) { + // [version1, version2] + // version1 should be equivalent to version2 + [['1.2.3', 'v1.2.3', true], + ['1.2.3', '=1.2.3', true], + ['1.2.3', 'v 1.2.3', true], + ['1.2.3', '= 1.2.3', true], + ['1.2.3', ' v1.2.3', true], + ['1.2.3', ' =1.2.3', true], + ['1.2.3', ' v 1.2.3', true], + ['1.2.3', ' = 1.2.3', true], + ['1.2.3-0', 'v1.2.3-0', true], + ['1.2.3-0', '=1.2.3-0', true], + ['1.2.3-0', 'v 1.2.3-0', true], + ['1.2.3-0', '= 1.2.3-0', true], + ['1.2.3-0', ' v1.2.3-0', true], + ['1.2.3-0', ' =1.2.3-0', true], + ['1.2.3-0', ' v 1.2.3-0', true], + ['1.2.3-0', ' = 1.2.3-0', true], + ['1.2.3-1', 'v1.2.3-1', true], + ['1.2.3-1', '=1.2.3-1', true], + ['1.2.3-1', 'v 1.2.3-1', true], + ['1.2.3-1', '= 1.2.3-1', true], + ['1.2.3-1', ' v1.2.3-1', true], + ['1.2.3-1', ' =1.2.3-1', true], + ['1.2.3-1', ' v 1.2.3-1', true], + ['1.2.3-1', ' = 1.2.3-1', true], + ['1.2.3-beta', 'v1.2.3-beta', true], + ['1.2.3-beta', '=1.2.3-beta', true], + ['1.2.3-beta', 'v 1.2.3-beta', true], + ['1.2.3-beta', '= 1.2.3-beta', true], + ['1.2.3-beta', ' v1.2.3-beta', true], + ['1.2.3-beta', ' =1.2.3-beta', true], + ['1.2.3-beta', ' v 1.2.3-beta', true], + ['1.2.3-beta', ' = 1.2.3-beta', true], + ['1.2.3-beta+build', ' = 1.2.3-beta+otherbuild', true], + ['1.2.3+build', ' = 1.2.3+otherbuild', true], + ['1.2.3-beta+build', '1.2.3-beta+otherbuild'], + ['1.2.3+build', '1.2.3+otherbuild'], + [' v1.2.3+build', '1.2.3+otherbuild'] + ].forEach(function(v) { + var v0 = v[0]; + var v1 = v[1]; + var loose = v[2]; + t.ok(eq(v0, v1, loose), "eq('" + v0 + "', '" + v1 + "')"); + t.ok(!neq(v0, v1, loose), "!neq('" + v0 + "', '" + v1 + "')"); + t.ok(cmp(v0, '==', v1, loose), 'cmp(' + v0 + '==' + v1 + ')'); + t.ok(!cmp(v0, '!=', v1, loose), '!cmp(' + v0 + '!=' + v1 + ')'); + t.ok(!cmp(v0, '===', v1, loose), '!cmp(' + v0 + '===' + v1 + ')'); + t.ok(cmp(v0, '!==', v1, loose), 'cmp(' + v0 + '!==' + v1 + ')'); + t.ok(!gt(v0, v1, loose), "!gt('" + v0 + "', '" + v1 + "')"); + t.ok(gte(v0, v1, loose), "gte('" + v0 + "', '" + v1 + "')"); + t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')"); + t.ok(lte(v0, v1, loose), "lte('" + v0 + "', '" + v1 + "')"); + }); + t.end(); +}); + + +test('\nrange tests', function(t) { + // [range, version] + // version should be included by range + [['1.0.0 - 2.0.0', '1.2.3'], + ['^1.2.3+build', '1.2.3'], + ['^1.2.3+build', '1.3.0'], + ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3'], + ['1.2.3pre+asdf - 2.4.3-pre+asdf', '1.2.3', true], + ['1.2.3-pre+asdf - 2.4.3pre+asdf', '1.2.3', true], + ['1.2.3pre+asdf - 2.4.3pre+asdf', '1.2.3', true], + ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3-pre.2'], + ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '2.4.3-alpha'], + ['1.2.3+asdf - 2.4.3+asdf', '1.2.3'], + ['1.0.0', '1.0.0'], + ['>=*', '0.2.4'], + ['', '1.0.0'], + ['*', '1.2.3'], + ['*', 'v1.2.3', true], + ['>=1.0.0', '1.0.0'], + ['>=1.0.0', '1.0.1'], + ['>=1.0.0', '1.1.0'], + ['>1.0.0', '1.0.1'], + ['>1.0.0', '1.1.0'], + ['<=2.0.0', '2.0.0'], + ['<=2.0.0', '1.9999.9999'], + ['<=2.0.0', '0.2.9'], + ['<2.0.0', '1.9999.9999'], + ['<2.0.0', '0.2.9'], + ['>= 1.0.0', '1.0.0'], + ['>= 1.0.0', '1.0.1'], + ['>= 1.0.0', '1.1.0'], + ['> 1.0.0', '1.0.1'], + ['> 1.0.0', '1.1.0'], + ['<= 2.0.0', '2.0.0'], + ['<= 2.0.0', '1.9999.9999'], + ['<= 2.0.0', '0.2.9'], + ['< 2.0.0', '1.9999.9999'], + ['<\t2.0.0', '0.2.9'], + ['>=0.1.97', 'v0.1.97', true], + ['>=0.1.97', '0.1.97'], + ['0.1.20 || 1.2.4', '1.2.4'], + ['>=0.2.3 || <0.0.1', '0.0.0'], + ['>=0.2.3 || <0.0.1', '0.2.3'], + ['>=0.2.3 || <0.0.1', '0.2.4'], + ['||', '1.3.4'], + ['2.x.x', '2.1.3'], + ['1.2.x', '1.2.3'], + ['1.2.x || 2.x', '2.1.3'], + ['1.2.x || 2.x', '1.2.3'], + ['x', '1.2.3'], + ['2.*.*', '2.1.3'], + ['1.2.*', '1.2.3'], + ['1.2.* || 2.*', '2.1.3'], + ['1.2.* || 2.*', '1.2.3'], + ['*', '1.2.3'], + ['2', '2.1.2'], + ['2.3', '2.3.1'], + ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0 + ['~2.4', '2.4.5'], + ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0, + ['~1', '1.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '1.2.3'], + ['~> 1', '1.2.3'], + ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0, + ['~ 1.0', '1.0.2'], + ['~ 1.0.3', '1.0.12'], + ['>=1', '1.0.0'], + ['>= 1', '1.0.0'], + ['<1.2', '1.1.1'], + ['< 1.2', '1.1.1'], + ['~v0.5.4-pre', '0.5.5'], + ['~v0.5.4-pre', '0.5.4'], + ['=0.7.x', '0.7.2'], + ['<=0.7.x', '0.7.2'], + ['>=0.7.x', '0.7.2'], + ['<=0.7.x', '0.6.2'], + ['~1.2.1 >=1.2.3', '1.2.3'], + ['~1.2.1 =1.2.3', '1.2.3'], + ['~1.2.1 1.2.3', '1.2.3'], + ['~1.2.1 >=1.2.3 1.2.3', '1.2.3'], + ['~1.2.1 1.2.3 >=1.2.3', '1.2.3'], + ['~1.2.1 1.2.3', '1.2.3'], + ['>=1.2.1 1.2.3', '1.2.3'], + ['1.2.3 >=1.2.1', '1.2.3'], + ['>=1.2.3 >=1.2.1', '1.2.3'], + ['>=1.2.1 >=1.2.3', '1.2.3'], + ['>=1.2', '1.2.8'], + ['^1.2.3', '1.8.1'], + ['^0.1.2', '0.1.2'], + ['^0.1', '0.1.2'], + ['^1.2', '1.4.2'], + ['^1.2 ^1', '1.4.2'], + ['^1.2.3-alpha', '1.2.3-pre'], + ['^1.2.0-alpha', '1.2.0-pre'], + ['^0.0.1-alpha', '0.0.1-beta'] + ].forEach(function(v) { + var range = v[0]; + var ver = v[1]; + var loose = v[2]; + t.ok(satisfies(ver, range, loose), range + ' satisfied by ' + ver); + }); + t.end(); +}); + +test('\nnegative range tests', function(t) { + // [range, version] + // version should not be included by range + [['1.0.0 - 2.0.0', '2.2.3'], + ['1.2.3+asdf - 2.4.3+asdf', '1.2.3-pre.2'], + ['1.2.3+asdf - 2.4.3+asdf', '2.4.3-alpha'], + ['^1.2.3+build', '2.0.0'], + ['^1.2.3+build', '1.2.0'], + ['^1.2.3', '1.2.3-pre'], + ['^1.2', '1.2.0-pre'], + ['>1.2', '1.3.0-beta'], + ['<=1.2.3', '1.2.3-beta'], + ['^1.2.3', '1.2.3-beta'], + ['=0.7.x', '0.7.0-asdf'], + ['>=0.7.x', '0.7.0-asdf'], + ['1', '1.0.0beta', true], + ['<1', '1.0.0beta', true], + ['< 1', '1.0.0beta', true], + ['1.0.0', '1.0.1'], + ['>=1.0.0', '0.0.0'], + ['>=1.0.0', '0.0.1'], + ['>=1.0.0', '0.1.0'], + ['>1.0.0', '0.0.1'], + ['>1.0.0', '0.1.0'], + ['<=2.0.0', '3.0.0'], + ['<=2.0.0', '2.9999.9999'], + ['<=2.0.0', '2.2.9'], + ['<2.0.0', '2.9999.9999'], + ['<2.0.0', '2.2.9'], + ['>=0.1.97', 'v0.1.93', true], + ['>=0.1.97', '0.1.93'], + ['0.1.20 || 1.2.4', '1.2.3'], + ['>=0.2.3 || <0.0.1', '0.0.3'], + ['>=0.2.3 || <0.0.1', '0.2.2'], + ['2.x.x', '1.1.3'], + ['2.x.x', '3.1.3'], + ['1.2.x', '1.3.3'], + ['1.2.x || 2.x', '3.1.3'], + ['1.2.x || 2.x', '1.1.3'], + ['2.*.*', '1.1.3'], + ['2.*.*', '3.1.3'], + ['1.2.*', '1.3.3'], + ['1.2.* || 2.*', '3.1.3'], + ['1.2.* || 2.*', '1.1.3'], + ['2', '1.1.2'], + ['2.3', '2.4.1'], + ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0 + ['~2.4', '2.3.9'], + ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0 + ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0 + ['~1', '0.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '2.2.3'], + ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0 + ['<1', '1.0.0'], + ['>=1.2', '1.1.1'], + ['1', '2.0.0beta', true], + ['~v0.5.4-beta', '0.5.4-alpha'], + ['=0.7.x', '0.8.2'], + ['>=0.7.x', '0.6.2'], + ['<0.7.x', '0.7.2'], + ['<1.2.3', '1.2.3-beta'], + ['=1.2.3', '1.2.3-beta'], + ['>1.2', '1.2.8'], + ['^1.2.3', '2.0.0-alpha'], + ['^1.2.3', '1.2.2'], + ['^1.2', '1.1.9'], + ['*', 'v1.2.3-foo', true], + // invalid ranges never satisfied! + ['blerg', '1.2.3'], + ['git+https://user:password0123@github.com/foo', '123.0.0', true], + ['^1.2.3', '2.0.0-pre'] + ].forEach(function(v) { + var range = v[0]; + var ver = v[1]; + var loose = v[2]; + var found = satisfies(ver, range, loose); + t.ok(!found, ver + ' not satisfied by ' + range); + }); + t.end(); +}); + +test('\nincrement versions test', function(t) { +// [version, inc, result, identifier] +// inc(version, inc) -> result + [['1.2.3', 'major', '2.0.0'], + ['1.2.3', 'minor', '1.3.0'], + ['1.2.3', 'patch', '1.2.4'], + ['1.2.3tag', 'major', '2.0.0', true], + ['1.2.3-tag', 'major', '2.0.0'], + ['1.2.3', 'fake', null], + ['1.2.0-0', 'patch', '1.2.0'], + ['fake', 'major', null], + ['1.2.3-4', 'major', '2.0.0'], + ['1.2.3-4', 'minor', '1.3.0'], + ['1.2.3-4', 'patch', '1.2.3'], + ['1.2.3-alpha.0.beta', 'major', '2.0.0'], + ['1.2.3-alpha.0.beta', 'minor', '1.3.0'], + ['1.2.3-alpha.0.beta', 'patch', '1.2.3'], + ['1.2.4', 'prerelease', '1.2.5-0'], + ['1.2.3-0', 'prerelease', '1.2.3-1'], + ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1'], + ['1.2.3-alpha.1', 'prerelease', '1.2.3-alpha.2'], + ['1.2.3-alpha.2', 'prerelease', '1.2.3-alpha.3'], + ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta'], + ['1.2.3-alpha.1.beta', 'prerelease', '1.2.3-alpha.2.beta'], + ['1.2.3-alpha.2.beta', 'prerelease', '1.2.3-alpha.3.beta'], + ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta'], + ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta'], + ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta'], + ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1'], + ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2'], + ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3'], + ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta'], + ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta'], + ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta'], + ['1.2.0', 'prepatch', '1.2.1-0'], + ['1.2.0-1', 'prepatch', '1.2.1-0'], + ['1.2.0', 'preminor', '1.3.0-0'], + ['1.2.3-1', 'preminor', '1.3.0-0'], + ['1.2.0', 'premajor', '2.0.0-0'], + ['1.2.3-1', 'premajor', '2.0.0-0'], + ['1.2.0-1', 'minor', '1.2.0'], + ['1.0.0-1', 'major', '1.0.0'], + + ['1.2.3', 'major', '2.0.0', false, 'dev'], + ['1.2.3', 'minor', '1.3.0', false, 'dev'], + ['1.2.3', 'patch', '1.2.4', false, 'dev'], + ['1.2.3tag', 'major', '2.0.0', true, 'dev'], + ['1.2.3-tag', 'major', '2.0.0', false, 'dev'], + ['1.2.3', 'fake', null, false, 'dev'], + ['1.2.0-0', 'patch', '1.2.0', false, 'dev'], + ['fake', 'major', null, false, 'dev'], + ['1.2.3-4', 'major', '2.0.0', false, 'dev'], + ['1.2.3-4', 'minor', '1.3.0', false, 'dev'], + ['1.2.3-4', 'patch', '1.2.3', false, 'dev'], + ['1.2.3-alpha.0.beta', 'major', '2.0.0', false, 'dev'], + ['1.2.3-alpha.0.beta', 'minor', '1.3.0', false, 'dev'], + ['1.2.3-alpha.0.beta', 'patch', '1.2.3', false, 'dev'], + ['1.2.4', 'prerelease', '1.2.5-dev.0', false, 'dev'], + ['1.2.3-0', 'prerelease', '1.2.3-dev.0', false, 'dev'], + ['1.2.3-alpha.0', 'prerelease', '1.2.3-dev.0', false, 'dev'], + ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1', false, 'alpha'], + ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'], + ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta', false, 'alpha'], + ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'], + ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta', false, 'alpha'], + ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta', false, 'alpha'], + ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta', false, 'alpha'], + ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-dev.0', false, 'dev'], + ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1', false, 'alpha'], + ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2', false, 'alpha'], + ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3', false, 'alpha'], + ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'], + ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta', false, 'alpha'], + ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta', false, 'alpha'], + ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta', false, 'alpha'], + ['1.2.0', 'prepatch', '1.2.1-dev.0', false, 'dev'], + ['1.2.0-1', 'prepatch', '1.2.1-dev.0', false, 'dev'], + ['1.2.0', 'preminor', '1.3.0-dev.0', false, 'dev'], + ['1.2.3-1', 'preminor', '1.3.0-dev.0', false, 'dev'], + ['1.2.0', 'premajor', '2.0.0-dev.0', false, 'dev'], + ['1.2.3-1', 'premajor', '2.0.0-dev.0', false, 'dev'], + ['1.2.0-1', 'minor', '1.2.0', false, 'dev'], + ['1.0.0-1', 'major', '1.0.0', false, 'dev'], + ['1.2.3-dev.bar', 'prerelease', '1.2.3-dev.0', false, 'dev'] + + ].forEach(function(v) { + var pre = v[0]; + var what = v[1]; + var wanted = v[2]; + var loose = v[3]; + var id = v[4]; + var found = inc(pre, what, loose, id); + var cmd = 'inc(' + pre + ', ' + what + ', ' + id + ')'; + t.equal(found, wanted, cmd + ' === ' + wanted); + + var parsed = semver.parse(pre, loose); + if (wanted) { + parsed.inc(what, id); + t.equal(parsed.version, wanted, cmd + ' object version updated'); + t.equal(parsed.raw, wanted, cmd + ' object raw field updated'); + } else if (parsed) { + t.throws(function () { + parsed.inc(what, id) + }) + } else { + t.equal(parsed, null) + } + }); + + t.end(); +}); + +test('\ndiff versions test', function(t) { +// [version1, version2, result] +// diff(version1, version2) -> result + [['1.2.3', '0.2.3', 'major'], + ['1.4.5', '0.2.3', 'major'], + ['1.2.3', '2.0.0-pre', 'premajor'], + ['1.2.3', '1.3.3', 'minor'], + ['1.0.1', '1.1.0-pre', 'preminor'], + ['1.2.3', '1.2.4', 'patch'], + ['1.2.3', '1.2.4-pre', 'prepatch'], + ['0.0.1', '0.0.1-pre', 'prerelease'], + ['0.0.1', '0.0.1-pre-2', 'prerelease'], + ['1.1.0', '1.1.0-pre', 'prerelease'], + ['1.1.0-pre-1', '1.1.0-pre-2', 'prerelease'], + ['1.0.0', '1.0.0', null] + + ].forEach(function(v) { + var version1 = v[0]; + var version2 = v[1]; + var wanted = v[2]; + var found = diff(version1, version2); + var cmd = 'diff(' + version1 + ', ' + version2 + ')'; + t.equal(found, wanted, cmd + ' === ' + wanted); + }); + + t.end(); +}); + +test('\nvalid range test', function(t) { + // [range, result] + // validRange(range) -> result + // translate ranges into their canonical form + [['1.0.0 - 2.0.0', '>=1.0.0 <=2.0.0'], + ['1.0.0', '1.0.0'], + ['>=*', '*'], + ['', '*'], + ['*', '*'], + ['*', '*'], + ['>=1.0.0', '>=1.0.0'], + ['>1.0.0', '>1.0.0'], + ['<=2.0.0', '<=2.0.0'], + ['1', '>=1.0.0 <2.0.0'], + ['<=2.0.0', '<=2.0.0'], + ['<=2.0.0', '<=2.0.0'], + ['<2.0.0', '<2.0.0'], + ['<2.0.0', '<2.0.0'], + ['>= 1.0.0', '>=1.0.0'], + ['>= 1.0.0', '>=1.0.0'], + ['>= 1.0.0', '>=1.0.0'], + ['> 1.0.0', '>1.0.0'], + ['> 1.0.0', '>1.0.0'], + ['<= 2.0.0', '<=2.0.0'], + ['<= 2.0.0', '<=2.0.0'], + ['<= 2.0.0', '<=2.0.0'], + ['< 2.0.0', '<2.0.0'], + ['< 2.0.0', '<2.0.0'], + ['>=0.1.97', '>=0.1.97'], + ['>=0.1.97', '>=0.1.97'], + ['0.1.20 || 1.2.4', '0.1.20||1.2.4'], + ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'], + ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'], + ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'], + ['||', '||'], + ['2.x.x', '>=2.0.0 <3.0.0'], + ['1.2.x', '>=1.2.0 <1.3.0'], + ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'], + ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'], + ['x', '*'], + ['2.*.*', '>=2.0.0 <3.0.0'], + ['1.2.*', '>=1.2.0 <1.3.0'], + ['1.2.* || 2.*', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'], + ['*', '*'], + ['2', '>=2.0.0 <3.0.0'], + ['2.3', '>=2.3.0 <2.4.0'], + ['~2.4', '>=2.4.0 <2.5.0'], + ['~2.4', '>=2.4.0 <2.5.0'], + ['~>3.2.1', '>=3.2.1 <3.3.0'], + ['~1', '>=1.0.0 <2.0.0'], + ['~>1', '>=1.0.0 <2.0.0'], + ['~> 1', '>=1.0.0 <2.0.0'], + ['~1.0', '>=1.0.0 <1.1.0'], + ['~ 1.0', '>=1.0.0 <1.1.0'], + ['^0', '>=0.0.0 <1.0.0'], + ['^ 1', '>=1.0.0 <2.0.0'], + ['^0.1', '>=0.1.0 <0.2.0'], + ['^1.0', '>=1.0.0 <2.0.0'], + ['^1.2', '>=1.2.0 <2.0.0'], + ['^0.0.1', '>=0.0.1 <0.0.2'], + ['^0.0.1-beta', '>=0.0.1-beta <0.0.2'], + ['^0.1.2', '>=0.1.2 <0.2.0'], + ['^1.2.3', '>=1.2.3 <2.0.0'], + ['^1.2.3-beta.4', '>=1.2.3-beta.4 <2.0.0'], + ['<1', '<1.0.0'], + ['< 1', '<1.0.0'], + ['>=1', '>=1.0.0'], + ['>= 1', '>=1.0.0'], + ['<1.2', '<1.2.0'], + ['< 1.2', '<1.2.0'], + ['1', '>=1.0.0 <2.0.0'], + ['>01.02.03', '>1.2.3', true], + ['>01.02.03', null], + ['~1.2.3beta', '>=1.2.3-beta <1.3.0', true], + ['~1.2.3beta', null], + ['^ 1.2 ^ 1', '>=1.2.0 <2.0.0 >=1.0.0 <2.0.0'] + ].forEach(function(v) { + var pre = v[0]; + var wanted = v[1]; + var loose = v[2]; + var found = validRange(pre, loose); + + t.equal(found, wanted, 'validRange(' + pre + ') === ' + wanted); + }); + + t.end(); +}); + +test('\ncomparators test', function(t) { + // [range, comparators] + // turn range into a set of individual comparators + [['1.0.0 - 2.0.0', [['>=1.0.0', '<=2.0.0']]], + ['1.0.0', [['1.0.0']]], + ['>=*', [['']]], + ['', [['']]], + ['*', [['']]], + ['*', [['']]], + ['>=1.0.0', [['>=1.0.0']]], + ['>=1.0.0', [['>=1.0.0']]], + ['>=1.0.0', [['>=1.0.0']]], + ['>1.0.0', [['>1.0.0']]], + ['>1.0.0', [['>1.0.0']]], + ['<=2.0.0', [['<=2.0.0']]], + ['1', [['>=1.0.0', '<2.0.0']]], + ['<=2.0.0', [['<=2.0.0']]], + ['<=2.0.0', [['<=2.0.0']]], + ['<2.0.0', [['<2.0.0']]], + ['<2.0.0', [['<2.0.0']]], + ['>= 1.0.0', [['>=1.0.0']]], + ['>= 1.0.0', [['>=1.0.0']]], + ['>= 1.0.0', [['>=1.0.0']]], + ['> 1.0.0', [['>1.0.0']]], + ['> 1.0.0', [['>1.0.0']]], + ['<= 2.0.0', [['<=2.0.0']]], + ['<= 2.0.0', [['<=2.0.0']]], + ['<= 2.0.0', [['<=2.0.0']]], + ['< 2.0.0', [['<2.0.0']]], + ['<\t2.0.0', [['<2.0.0']]], + ['>=0.1.97', [['>=0.1.97']]], + ['>=0.1.97', [['>=0.1.97']]], + ['0.1.20 || 1.2.4', [['0.1.20'], ['1.2.4']]], + ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]], + ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]], + ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]], + ['||', [[''], ['']]], + ['2.x.x', [['>=2.0.0', '<3.0.0']]], + ['1.2.x', [['>=1.2.0', '<1.3.0']]], + ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]], + ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]], + ['x', [['']]], + ['2.*.*', [['>=2.0.0', '<3.0.0']]], + ['1.2.*', [['>=1.2.0', '<1.3.0']]], + ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]], + ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]], + ['*', [['']]], + ['2', [['>=2.0.0', '<3.0.0']]], + ['2.3', [['>=2.3.0', '<2.4.0']]], + ['~2.4', [['>=2.4.0', '<2.5.0']]], + ['~2.4', [['>=2.4.0', '<2.5.0']]], + ['~>3.2.1', [['>=3.2.1', '<3.3.0']]], + ['~1', [['>=1.0.0', '<2.0.0']]], + ['~>1', [['>=1.0.0', '<2.0.0']]], + ['~> 1', [['>=1.0.0', '<2.0.0']]], + ['~1.0', [['>=1.0.0', '<1.1.0']]], + ['~ 1.0', [['>=1.0.0', '<1.1.0']]], + ['~ 1.0.3', [['>=1.0.3', '<1.1.0']]], + ['~> 1.0.3', [['>=1.0.3', '<1.1.0']]], + ['<1', [['<1.0.0']]], + ['< 1', [['<1.0.0']]], + ['>=1', [['>=1.0.0']]], + ['>= 1', [['>=1.0.0']]], + ['<1.2', [['<1.2.0']]], + ['< 1.2', [['<1.2.0']]], + ['1', [['>=1.0.0', '<2.0.0']]], + ['1 2', [['>=1.0.0', '<2.0.0', '>=2.0.0', '<3.0.0']]], + ['1.2 - 3.4.5', [['>=1.2.0', '<=3.4.5']]], + ['1.2.3 - 3.4', [['>=1.2.3', '<3.5.0']]], + ['1.2.3 - 3', [['>=1.2.3', '<4.0.0']]], + ['>*', [['<0.0.0']]], + ['<*', [['<0.0.0']]] + ].forEach(function(v) { + var pre = v[0]; + var wanted = v[1]; + var found = toComparators(v[0]); + var jw = JSON.stringify(wanted); + t.equivalent(found, wanted, 'toComparators(' + pre + ') === ' + jw); + }); + + t.end(); +}); + +test('\ninvalid version numbers', function(t) { + ['1.2.3.4', + 'NOT VALID', + 1.2, + null, + 'Infinity.NaN.Infinity' + ].forEach(function(v) { + t.throws(function() { + new SemVer(v); + }, {name:'TypeError', message:'Invalid Version: ' + v}); + }); + + t.end(); +}); + +test('\nstrict vs loose version numbers', function(t) { + [['=1.2.3', '1.2.3'], + ['01.02.03', '1.2.3'], + ['1.2.3-beta.01', '1.2.3-beta.1'], + [' =1.2.3', '1.2.3'], + ['1.2.3foo', '1.2.3-foo'] + ].forEach(function(v) { + var loose = v[0]; + var strict = v[1]; + t.throws(function() { + new SemVer(loose); + }); + var lv = new SemVer(loose, true); + t.equal(lv.version, strict); + t.ok(eq(loose, strict, true)); + t.throws(function() { + eq(loose, strict); + }); + t.throws(function() { + new SemVer(strict).compare(loose); + }); + }); + t.end(); +}); + +test('\nstrict vs loose ranges', function(t) { + [['>=01.02.03', '>=1.2.3'], + ['~1.02.03beta', '>=1.2.3-beta <1.3.0'] + ].forEach(function(v) { + var loose = v[0]; + var comps = v[1]; + t.throws(function() { + new Range(loose); + }); + t.equal(new Range(loose, true).range, comps); + }); + t.end(); +}); + +test('\nmax satisfying', function(t) { + [[['1.2.3', '1.2.4'], '1.2', '1.2.4'], + [['1.2.4', '1.2.3'], '1.2', '1.2.4'], + [['1.2.3', '1.2.4', '1.2.5', '1.2.6'], '~1.2.3', '1.2.6'], + [['1.1.0', '1.2.0', '1.2.1', '1.3.0', '2.0.0b1', '2.0.0b2', '2.0.0b3', '2.0.0', '2.1.0'], '~2.0.0', '2.0.0', true] + ].forEach(function(v) { + var versions = v[0]; + var range = v[1]; + var expect = v[2]; + var loose = v[3]; + var actual = semver.maxSatisfying(versions, range, loose); + t.equal(actual, expect); + }); + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/ltr.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/ltr.js new file mode 100644 index 0000000..0f7167d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/ltr.js @@ -0,0 +1,181 @@ +var tap = require('tap'); +var test = tap.test; +var semver = require('../semver.js'); +var ltr = semver.ltr; + +test('\nltr tests', function(t) { + // [range, version, loose] + // Version should be less than range + [ + ['~1.2.2', '1.2.1'], + ['~0.6.1-1', '0.6.1-0'], + ['1.0.0 - 2.0.0', '0.0.1'], + ['1.0.0-beta.2', '1.0.0-beta.1'], + ['1.0.0', '0.0.0'], + ['>=2.0.0', '1.1.1'], + ['>=2.0.0', '1.2.9'], + ['>2.0.0', '2.0.0'], + ['0.1.20 || 1.2.4', '0.1.5'], + ['2.x.x', '1.0.0'], + ['1.2.x', '1.1.0'], + ['1.2.x || 2.x', '1.0.0'], + ['2.*.*', '1.0.1'], + ['1.2.*', '1.1.3'], + ['1.2.* || 2.*', '1.1.9999'], + ['2', '1.0.0'], + ['2.3', '2.2.2'], + ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0 + ['~2.4', '2.3.5'], + ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0 + ['~1', '0.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '0.2.4'], + ['~> 1', '0.2.3'], + ['~1.0', '0.1.2'], // >=1.0.0 <1.1.0 + ['~ 1.0', '0.1.0'], + ['>1.2', '1.2.0'], + ['> 1.2', '1.2.1'], + ['1', '0.0.0beta', true], + ['~v0.5.4-pre', '0.5.4-alpha'], + ['~v0.5.4-pre', '0.5.4-alpha'], + ['=0.7.x', '0.6.0'], + ['=0.7.x', '0.6.0-asdf'], + ['>=0.7.x', '0.6.0'], + ['~1.2.2', '1.2.1'], + ['1.0.0 - 2.0.0', '0.2.3'], + ['1.0.0', '0.0.1'], + ['>=2.0.0', '1.0.0'], + ['>=2.0.0', '1.9999.9999'], + ['>=2.0.0', '1.2.9'], + ['>2.0.0', '2.0.0'], + ['>2.0.0', '1.2.9'], + ['2.x.x', '1.1.3'], + ['1.2.x', '1.1.3'], + ['1.2.x || 2.x', '1.1.3'], + ['2.*.*', '1.1.3'], + ['1.2.*', '1.1.3'], + ['1.2.* || 2.*', '1.1.3'], + ['2', '1.9999.9999'], + ['2.3', '2.2.1'], + ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0 + ['~>3.2.1', '2.3.2'], // >=3.2.1 <3.3.0 + ['~1', '0.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '0.2.3'], + ['~1.0', '0.0.0'], // >=1.0.0 <1.1.0 + ['>1', '1.0.0'], + ['2', '1.0.0beta', true], + ['>1', '1.0.0beta', true], + ['> 1', '1.0.0beta', true], + ['=0.7.x', '0.6.2'], + ['=0.7.x', '0.7.0-asdf'], + ['^1', '1.0.0-0'], + ['>=0.7.x', '0.7.0-asdf'], + ['1', '1.0.0beta', true], + ['>=0.7.x', '0.6.2'], + ['>1.2.3', '1.3.0-alpha'] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var loose = tuple[2] || false; + var msg = 'ltr(' + version + ', ' + range + ', ' + loose + ')'; + t.ok(ltr(version, range, loose), msg); + }); + t.end(); +}); + +test('\nnegative ltr tests', function(t) { + // [range, version, loose] + // Version should NOT be less than range + [ + ['~ 1.0', '1.1.0'], + ['~0.6.1-1', '0.6.1-1'], + ['1.0.0 - 2.0.0', '1.2.3'], + ['1.0.0 - 2.0.0', '2.9.9'], + ['1.0.0', '1.0.0'], + ['>=*', '0.2.4'], + ['', '1.0.0', true], + ['*', '1.2.3'], + ['>=1.0.0', '1.0.0'], + ['>=1.0.0', '1.0.1'], + ['>=1.0.0', '1.1.0'], + ['>1.0.0', '1.0.1'], + ['>1.0.0', '1.1.0'], + ['<=2.0.0', '2.0.0'], + ['<=2.0.0', '1.9999.9999'], + ['<=2.0.0', '0.2.9'], + ['<2.0.0', '1.9999.9999'], + ['<2.0.0', '0.2.9'], + ['>= 1.0.0', '1.0.0'], + ['>= 1.0.0', '1.0.1'], + ['>= 1.0.0', '1.1.0'], + ['> 1.0.0', '1.0.1'], + ['> 1.0.0', '1.1.0'], + ['<= 2.0.0', '2.0.0'], + ['<= 2.0.0', '1.9999.9999'], + ['<= 2.0.0', '0.2.9'], + ['< 2.0.0', '1.9999.9999'], + ['<\t2.0.0', '0.2.9'], + ['>=0.1.97', 'v0.1.97'], + ['>=0.1.97', '0.1.97'], + ['0.1.20 || 1.2.4', '1.2.4'], + ['0.1.20 || >1.2.4', '1.2.4'], + ['0.1.20 || 1.2.4', '1.2.3'], + ['0.1.20 || 1.2.4', '0.1.20'], + ['>=0.2.3 || <0.0.1', '0.0.0'], + ['>=0.2.3 || <0.0.1', '0.2.3'], + ['>=0.2.3 || <0.0.1', '0.2.4'], + ['||', '1.3.4'], + ['2.x.x', '2.1.3'], + ['1.2.x', '1.2.3'], + ['1.2.x || 2.x', '2.1.3'], + ['1.2.x || 2.x', '1.2.3'], + ['x', '1.2.3'], + ['2.*.*', '2.1.3'], + ['1.2.*', '1.2.3'], + ['1.2.* || 2.*', '2.1.3'], + ['1.2.* || 2.*', '1.2.3'], + ['1.2.* || 2.*', '1.2.3'], + ['*', '1.2.3'], + ['2', '2.1.2'], + ['2.3', '2.3.1'], + ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0 + ['~2.4', '2.4.5'], + ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0 + ['~1', '1.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '1.2.3'], + ['~> 1', '1.2.3'], + ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0 + ['~ 1.0', '1.0.2'], + ['>=1', '1.0.0'], + ['>= 1', '1.0.0'], + ['<1.2', '1.1.1'], + ['< 1.2', '1.1.1'], + ['~v0.5.4-pre', '0.5.5'], + ['~v0.5.4-pre', '0.5.4'], + ['=0.7.x', '0.7.2'], + ['>=0.7.x', '0.7.2'], + ['<=0.7.x', '0.6.2'], + ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'], + ['>=0.2.3 <=0.2.4', '0.2.4'], + ['1.0.0 - 2.0.0', '2.0.0'], + ['^3.0.0', '4.0.0'], + ['^1.0.0 || ~2.0.1', '2.0.0'], + ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'], + ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true], + ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true], + ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'], + ['^1.0.0alpha', '1.0.0beta', true], + ['~1.0.0alpha', '1.0.0beta', true], + ['^1.0.0-alpha', '1.0.0beta', true], + ['~1.0.0-alpha', '1.0.0beta', true], + ['^1.0.0-alpha', '1.0.0-beta'], + ['~1.0.0-alpha', '1.0.0-beta'], + ['=0.1.0', '1.0.0'] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var loose = tuple[2] || false; + var msg = '!ltr(' + version + ', ' + range + ', ' + loose + ')'; + t.notOk(ltr(version, range, loose), msg); + }); + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/major-minor-patch.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/major-minor-patch.js new file mode 100644 index 0000000..e9d4039 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/test/major-minor-patch.js @@ -0,0 +1,72 @@ +var tap = require('tap'); +var test = tap.test; +var semver = require('../semver.js'); + +test('\nmajor tests', function(t) { + // [range, version] + // Version should be detectable despite extra characters + [ + ['1.2.3', 1], + [' 1.2.3 ', 1], + [' 2.2.3-4 ', 2], + [' 3.2.3-pre ', 3], + ['v5.2.3', 5], + [' v8.2.3 ', 8], + ['\t13.2.3', 13], + ['=21.2.3', 21, true], + ['v=34.2.3', 34, true] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var loose = tuple[2] || false; + var msg = 'major(' + range + ') = ' + version; + t.equal(semver.major(range, loose), version, msg); + }); + t.end(); +}); + +test('\nminor tests', function(t) { + // [range, version] + // Version should be detectable despite extra characters + [ + ['1.1.3', 1], + [' 1.1.3 ', 1], + [' 1.2.3-4 ', 2], + [' 1.3.3-pre ', 3], + ['v1.5.3', 5], + [' v1.8.3 ', 8], + ['\t1.13.3', 13], + ['=1.21.3', 21, true], + ['v=1.34.3', 34, true] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var loose = tuple[2] || false; + var msg = 'minor(' + range + ') = ' + version; + t.equal(semver.minor(range, loose), version, msg); + }); + t.end(); +}); + +test('\npatch tests', function(t) { + // [range, version] + // Version should be detectable despite extra characters + [ + ['1.2.1', 1], + [' 1.2.1 ', 1], + [' 1.2.2-4 ', 2], + [' 1.2.3-pre ', 3], + ['v1.2.5', 5], + [' v1.2.8 ', 8], + ['\t1.2.13', 13], + ['=1.2.21', 21, true], + ['v=1.2.34', 34, true] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var loose = tuple[2] || false; + var msg = 'patch(' + range + ') = ' + version; + t.equal(semver.patch(range, loose), version, msg); + }); + t.end(); +}); 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..572bd7c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + "shelljs@^0.5.3", + "/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": { + "email": "arturadib@gmail.com", + "name": "artur" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "shelljs", + "raw": "shelljs@^0.5.3", + "rawSpec": "^0.5.3", + "scope": null, + "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": { + "email": "arturadib@gmail.com", + "name": "Artur Adib" + }, + "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": "http://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "gitHead": "22d0975040b9b8234755dc6e692d6869436e8485", + "homepage": "http://github.com/arturadib/shelljs", + "keywords": [ + "jake", + "make", + "makefile", + "shell", + "synchronous", + "unix" + ], + "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..3304948 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + "underscore@^1.8.3", + "/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": { + "email": "jashkenas@gmail.com", + "name": "jashkenas" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "name": "underscore", + "raw": "underscore@^1.8.3", + "rawSpec": "^1.8.3", + "scope": null, + "spec": ">=1.8.3 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_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": { + "email": "jeremy@documentcloud.org", + "name": "Jeremy Ashkenas" + }, + "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": "http://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz" + }, + "files": [ + "LICENSE", + "underscore-min.js", + "underscore-min.map", + "underscore.js" + ], + "gitHead": "e4743ab712b8ab42ad4ccb48b155034d02394e4d", + "homepage": "http://underscorejs.org", + "keywords": [ + "browser", + "client", + "functional", + "server", + "util" + ], + "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..ca5fd67 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/unorm/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + "unorm@^1.3.3", + "/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": { + "email": "bwp@bwp.dk", + "name": "walling" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "name": "unorm", + "raw": "unorm@^1.3.3", + "rawSpec": "^1.3.3", + "scope": null, + "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": { + "email": "bwp@bwp.dk", + "name": "Bjarke Walling" + }, + "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": "http://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..4ad9893 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + "util-deprecate@1.0.2", + "/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": { + "email": "nathan@tootallnate.net", + "name": "tootallnate" + }, + "_npmVersion": "2.14.4", + "_phantomChildren": {}, + "_requested": { + "name": "util-deprecate", + "raw": "util-deprecate@1.0.2", + "rawSpec": "1.0.2", + "scope": null, + "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": { + "email": "nathan@tootallnate.net", + "name": "Nathan Rajlich", + "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": "http://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + }, + "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", + "homepage": "https://github.com/TooTallNate/util-deprecate", + "keywords": [ + "browser", + "browserify", + "deprecate", + "node", + "util" + ], + "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..35d4cc7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/package.json @@ -0,0 +1,78 @@ +{ + "_args": [ + [ + "wrappy@1", + "/Users/steveng/repo/cordova/cordova-android/node_modules/inflight" + ] + ], + "_from": "wrappy@>=1.0.0 <2.0.0", + "_id": "wrappy@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/wrappy", + "_nodeVersion": "0.10.31", + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "2.0.0", + "_phantomChildren": {}, + "_requested": { + "name": "wrappy", + "raw": "wrappy@1", + "rawSpec": "1", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/inflight", + "/once" + ], + "_resolved": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", + "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "_shrinkwrap": null, + "_spec": "wrappy@1", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/inflight", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "dependencies": {}, + "description": "Callback wrapping utility", + "devDependencies": { + "tap": "^0.4.12" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + }, + "gitHead": "006a8cbac6b99988315834c207896eed71fd069a", + "homepage": "https://github.com/npm/wrappy", + "license": "ISC", + "main": "wrappy.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "wrappy", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/wrappy.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.0.1" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/test/basic.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/test/basic.js new file mode 100644 index 0000000..5ed0fcd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/test/basic.js @@ -0,0 +1,51 @@ +var test = require('tap').test +var wrappy = require('../wrappy.js') + +test('basic', function (t) { + function onceifier (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } + } + onceifier.iAmOnce = {} + var once = wrappy(onceifier) + t.equal(once.iAmOnce, onceifier.iAmOnce) + + var called = 0 + function boo () { + t.equal(called, 0) + called++ + } + // has some rando property + boo.iAmBoo = true + + var onlyPrintOnce = once(boo) + + onlyPrintOnce() // prints 'boo' + onlyPrintOnce() // does nothing + t.equal(called, 1) + + // random property is retained! + t.equal(onlyPrintOnce.iAmBoo, true) + + var logs = [] + var logwrap = wrappy(function (msg, cb) { + logs.push(msg + ' wrapping cb') + return function () { + logs.push(msg + ' before cb') + var ret = cb.apply(this, arguments) + logs.push(msg + ' after cb') + } + }) + + var c = logwrap('foo', function () { + t.same(logs, [ 'foo wrapping cb', 'foo before cb' ]) + }) + c() + t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ]) + + t.end() +}) 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", + "_id": "xmldom@0.1.22", + "_inCache": true, + "_installable": true, + "_location": "/xmldom", + "_nodeVersion": "5.5.0", + "_npmUser": { + "email": "jindw@xidea.org", + "name": "jindw" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "name": "xmldom", + "raw": "xmldom@0.1.x", + "rawSpec": "0.1.x", + "scope": null, + "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": { + "email": "jindw@xidea.org", + "name": "jindw", + "url": "http://www.xidea.org" + }, + "bugs": { + "email": "jindw@xidea.org", + "url": "http://github.com/jindw/xmldom/issues" + }, + "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": "http://registry.npmjs.org/xmldom/-/xmldom-0.1.22.tgz" + }, + "engines": { + "node": ">=0.1" + }, + "gitHead": "29a83b315aef56c156602286b2d884a3b4c2521f", + "homepage": "https://github.com/jindw/xmldom", + "keywords": [ + "DOMParser", + "XMLSerializer", + "dom", + "javascript", + "parser", + "w3c", + "xml" + ], + "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)//

    Loading.

    Please wait.

    Loading...
    \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js similarity index 100% rename from MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/vendor.5c22674a.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/vendor.5c22674a.js new file mode 100644 index 0000000..57e8643 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/vendor.5c22674a.js @@ -0,0 +1,13 @@ +!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&&console.log("WARNING: Tried to load angular more than once.")):(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))}}}}])}(),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(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(){console.log("Luhn::ctor");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(console.log("Luhn::check"),!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(){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),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}); \ 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.d7816846.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/styles/main.d7816846.css new file mode 100644 index 0000000..4aa81d5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/styles/main.d7816846.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}.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}.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;height:64px}.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}} \ 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/platforms/ios/www/molpay-mobile-xdk-www/views/alertmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/alertmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/alertmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/alertmodal.html diff --git a/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/banklistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/banklistmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/banklistmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/banklistmodal.html diff --git a/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/cardlistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/cardlistmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/cardlistmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/cardlistmodal.html diff --git a/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/channelmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/channelmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/channelmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/channelmodal.html diff --git a/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/countrylistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/countrylistmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/countrylistmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/countrylistmodal.html diff --git a/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/finalizingpayment.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/finalizingpayment.html similarity index 100% rename from MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/finalizingpayment.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/finalizingpayment.html diff --git a/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/main.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/main.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/main.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/main.html diff --git a/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/paymentinfo.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/paymentinfo.html similarity index 100% rename from MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/paymentinfo.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/paymentinfo.html diff --git a/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/receipt.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/receipt.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/receipt.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/views/receipt.html 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..3e87a6e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -0,0 +1,114 @@ +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", []); + }, + 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-whitelist/whitelist.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-whitelist/whitelist.js new file mode 100644 index 0000000..a2ba8a3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-whitelist/whitelist.js @@ -0,0 +1,30 @@ +cordova.define("cordova-plugin-whitelist.whitelist", 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. + * +*/ + +if (!document.querySelector('meta[http-equiv=Content-Security-Policy]')) { + var msg = 'No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.'; + console.error(msg); + setInterval(function() { + console.warn(msg); + }, 10000); +} + +}); 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..c7a2cff --- /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://",molpayresulturl="https://www.onlinepayment.com.my/MOLPay/result.php",molpaynbepayurl="https://www.onlinepayment.com.my/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){isInternalDebugging&&console.log("postMolpayResultHandler innHtml = "+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),isInternalDebugging&&console.log("innHtmlString = "+b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(isInternalDebugging&&console.log("onMolpayUiFrameLoad B4 results = "+b),g=JSON.parse(b))){var h=g.tranID;h&&(isInternalDebugging&&console.log("mainUiFrame.contentWindow.transactionRequestWithTransactionId = "+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){isInternalDebugging&&console.log("onBankUiLoadstop event.url ="+a.url);var b;b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpaynbepayurl found"),bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){isInternalDebugging&&console.log("bankUiWindow window.open to window.location inject ok")}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){isInternalDebugging&&console.log("bankUiWindow window.close to window.location.assign inject ok")}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){isInternalDebugging&&console.log("onBankUiLoadstart event.url = "+a.url);var b;if(b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstart molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b),postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)){isInternalDebugging&&console.log("onBankUiLoadstart molpaynbepayurl found");var c=10,f=0,g=setInterval(function(){h()},1e3),h=function(){f++,f>c?clearInterval(g):bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b);var c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(g))})}}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){var b,c;if(a&&a.indexOf(mpopenmolpaywindow)>-1)c=new RegExp(mpopenmolpaywindow,"g"),b=a.replace(c,""),b&&b.length>0&&(isInternalDebugging&&console.log("inAppCallback base64HtmlString = ",b),createBankUiWindow(b));else if(a&&a.indexOf(mptransactionresults)>-1&&(c=new RegExp(mptransactionresults,"g"),b=a.replace(c,""),b&&b.length>0)){var d=window.atob(b),e=JSON.stringify(JSON.parse(d));transactionResultCallback(e),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(c=new RegExp(mprunscriptonpopup,"g"),b=a.replace(c,""),b&&b.length>0)){var f=window.atob(b);isInternalDebugging&&console.log("run script on popup, script ="+f),bankUiWindow.executeScript({code:f},function(a){isInternalDebugging&&console.log("run script on popup ok")})}},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isInternalDebugging&&console.log("MOLPay startmolpay paymentdetails = "+JSON.stringify(a,null,"")),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(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){isInternalDebugging&&console.log("MOLPay transactionRequest paymentdetails = "+JSON.stringify(a,null,""));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(){isClosingMolpay=!0,mainUiFrame.contentWindow.transactionRequest()};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..41602fd --- /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-23 +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-hdpi/icon.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-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/drawable-hdpi/icon.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-ldpi/icon.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-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/drawable-ldpi/icon.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-mdpi/icon.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-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/drawable-mdpi/icon.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-xhdpi/icon.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-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/drawable-xhdpi/icon.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/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..d6ee52f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/xml/config.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + 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/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..7bc0dfa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/molpay/mobile/xdk/example/MainActivity.java @@ -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. + */ + +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); + // Set by in config.xml + loadUrl(launchUrl); + } +} 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..f105a62 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/InAppBrowser.java @@ -0,0 +1,957 @@ +/* + 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.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.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 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 + 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); + back.setBackground(null); + back.setImageDrawable(backIcon); + back.setScaleType(ImageView.ScaleType.FIT_CENTER); + back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + 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); + forward.setBackground(null); + forward.setImageDrawable(fwdIcon); + forward.setScaleType(ImageView.ScaleType.FIT_CENTER); + forward.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + 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); + 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); + close.setBackground(null); + close.setImageDrawable(closeIcon); + close.setScaleType(ImageView.ScaleType.FIT_CENTER); + back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + 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)); + 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/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..d701720 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/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/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..4e4f57e --- /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.Whitelist; +import org.xmlpull.v1.XmlPullParser; + +import android.content.Context; +import android.util.Log; + +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 + +@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..67eb2e5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m @@ -0,0 +1,98 @@ +/* + 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.allowIntentsWhitelist.whitelistRejectionFormatString = @"ERROR External navigation rejected - not set for url='%@'"; + + self.allowNavigationsWhitelist = [[CDVWhitelist alloc] initWithArray:self.allowNavigations]; + self.allowNavigationsWhitelist.whitelistRejectionFormatString = @"ERROR Internal navigation rejected - not set for url='%@'"; + +} + +- (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]; + } +} + +- (BOOL)shouldOverrideLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType +{ + NSURL* url = [request URL]; + + switch (navigationType) { + case UIWebViewNavigationTypeLinkClicked: + // Note that the rejection strings will *only* print if + // it's a link click (and url is not whitelisted by ) + if ([self.allowIntentsWhitelist URLIsAllowed:url]) { + // the url *is* in a tag, push to the system + [[UIApplication sharedApplication] openURL:url]; + return NO; + } + // fall through, to check whether you can load this in the webview + default: + // check whether we can internally navigate to this url + return ([self.allowNavigationsWhitelist URLIsAllowed: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..c283e18 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m @@ -0,0 +1,197 @@ +/* + 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; +} + +@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..bfc3e44 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDV.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 "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 "CDVPlugin.h" +#import "CDVPluginResult.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..ef7c9ce --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h @@ -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. + */ + +#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 +/* 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_0_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..be796df --- /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('exeption 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..ff4c2f5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h @@ -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 +#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 CDVLocalNotification; +extern NSString* const CDVRemoteNotification; +extern NSString* const CDVRemoteNotificationError; + +@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 {} + - (void)didReceiveLocalNotification:(NSNotification *)notification; + */ + + /* + // These methods may optionally be implemented. If present, they will be called by CVDViewController when network-policy (whitelist) decisions need to be made. + + This method, if present, will be called by CDVURLProtocol to determine whether to block a request for a web resource. If all plugins which implement this method return true, then the request will be allowed. If any plugin returns false, the request will be blocked. If no plugins implement this method, then the default policy will be followed. (See [CDVViewController defaultResourcePolicyForURL:]) + + Note that this method will *not* be called for some resources, such as WebSocket connections, and will not be called by WKWebView at all. Please use CSP headers to handle those situations if needed. + + - (BOOL)shouldAllowRequestForURL:(NSURL *)url + + + This method, if present, will be called by CDVViewController to determine whether webview navigation to a web page should be allowed. If all plugins which implement this method return true, then the navigation will be allowed. If any plugin returns false, the navigation will be blocked. If no plugins implement this method, then the default policy will be followed. (See [CDVViewController defaultResourcePolicyForURL:]) + + - (BOOL)shouldAllowNavigationToURL:(NSURL *)url + + + This method, if present, will be called by CDVViewController to determine whether a web page which is otherwise blocked should be opened in the system browser. If all plugins which implement this method return true, then the page will be opened. If any plugin returns false, the page will not be opened. If no plugins implement this method, then the default policy will be followed. (See [CDVViewController shouldOpenExternalURL:] and [CDVViewController webView:shouldStartLoadWithRequest:navigationType:]) + + - (BOOL)shouldOpenExternalURL:(NSURL *)url + */ + +- (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..ac3a8ee --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.m @@ -0,0 +1,163 @@ +/* + 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"; + +@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.3.0 + // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveLocalNotification:) name:CDVLocalNotification object:nil]; + + // Added in 2.5.0 + // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pageDidLoad:) name:CDVPageDidLoadNotification object:self.webView]; +} + +- (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 notification unless added using addObserverForName:object:queue:usingBlock: +} + +- (id)appDelegate +{ + return [[UIApplication sharedApplication] delegate]; +} + +// default implementation does nothing, ideally, we are not registered for notification if we aren't going to do anything. +// - (void)didReceiveLocalNotification:(NSNotification *)notification +// { +// // UILocalNotification* localNotification = [notification object]; // get the payload as a LocalNotification +// } + +@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..c3402d0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.m @@ -0,0 +1,122 @@ +/* + 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; + NSString* systemAndLocale = [NSString stringWithFormat:@"%@ %@ %@", 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..129de02 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.h @@ -0,0 +1,84 @@ +/* + 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* 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; + +/** + 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..b66f524 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.m @@ -0,0 +1,651 @@ +/* + 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) NSArray* supportedOrientations; +@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; + + // load config.xml settings + [self loadSettings]; + } +} + +- (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"); +} + +- (void)parseSettingsWithParser:(NSObject *)delegate +{ + // read from config.xml in the app bundle + NSString* path = [[NSBundle mainBundle] pathForResource:@"config" ofType:@"xml"]; + + if (![[NSFileManager defaultManager] fileExistsAtPath:path]) { + NSAssert(NO, @"ERROR: config.xml does not exist. Please run cordova-ios/bin/cordova_plist_to_config_xml path/to/project."); + return; + } + + 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. + self.wwwFolderName = @"www"; + 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 { + // 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]; + + 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]; + } + } + }]; +} + +- (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 = @"CDVUIWebViewEngine"; + NSString* webViewEngineClass = [self.settings cordovaSettingForKey:@"CordovaWebViewEngine"]; + + 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..1454f6e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/VERSION @@ -0,0 +1 @@ +4.0.1 diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-all-non-framework-target-headers.hmap b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-all-non-framework-target-headers.hmap new file mode 100644 index 0000000..e062bb7 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-all-non-framework-target-headers.hmap differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-all-target-headers.hmap b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-all-target-headers.hmap new file mode 100644 index 0000000..e062bb7 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-all-target-headers.hmap differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-generated-files.hmap b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-generated-files.hmap new file mode 100644 index 0000000..dd8b535 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-generated-files.hmap differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-own-target-headers.hmap b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-own-target-headers.hmap new file mode 100644 index 0000000..505814e Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-own-target-headers.hmap differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-project-headers.hmap b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-project-headers.hmap new file mode 100644 index 0000000..857347d Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-project-headers.hmap differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova.hmap b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova.hmap new file mode 100644 index 0000000..2d57fdf Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova.hmap differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVAppDelegate.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVAppDelegate.d new file mode 100644 index 0000000..1a6c554 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVAppDelegate.d @@ -0,0 +1,14 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAppDelegate.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAppDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVAppDelegate.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVAppDelegate.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVAppDelegate.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVAppDelegate.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVAppDelegate.o new file mode 100644 index 0000000..61f0cde Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVAppDelegate.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandDelegateImpl.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandDelegateImpl.d new file mode 100644 index 0000000..3851601 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandDelegateImpl.d @@ -0,0 +1,15 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegateImpl.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVJSON_private.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandDelegateImpl.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandDelegateImpl.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandDelegateImpl.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandDelegateImpl.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandDelegateImpl.o new file mode 100644 index 0000000..eb0e592 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandDelegateImpl.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandQueue.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandQueue.d new file mode 100644 index 0000000..d773bc1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandQueue.d @@ -0,0 +1,16 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegateImpl.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVJSON_private.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVDebug.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandQueue.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandQueue.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandQueue.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandQueue.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandQueue.o new file mode 100644 index 0000000..3a815f2 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandQueue.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVConfigParser.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVConfigParser.d new file mode 100644 index 0000000..d6c5ac5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVConfigParser.d @@ -0,0 +1,3 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVConfigParser.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVConfigParser.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVConfigParser.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVConfigParser.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVConfigParser.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVConfigParser.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVConfigParser.o new file mode 100644 index 0000000..04b4dec Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVConfigParser.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVGestureHandler.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVGestureHandler.d new file mode 100644 index 0000000..f2857fb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVGestureHandler.d @@ -0,0 +1,11 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVGestureHandler/CDVGestureHandler.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVGestureHandler/CDVGestureHandler.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVGestureHandler.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVGestureHandler.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVGestureHandler.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVGestureHandler.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVGestureHandler.o new file mode 100644 index 0000000..9e42f64 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVGestureHandler.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVHandleOpenURL.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVHandleOpenURL.d new file mode 100644 index 0000000..5ef389d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVHandleOpenURL.d @@ -0,0 +1,20 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDV.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAppDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWhitelist.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVTimer.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVHandleOpenURL.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVHandleOpenURL.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVHandleOpenURL.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVHandleOpenURL.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVHandleOpenURL.o new file mode 100644 index 0000000..db9c9dc Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVHandleOpenURL.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVIntentAndNavigationFilter.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVIntentAndNavigationFilter.d new file mode 100644 index 0000000..7d30137 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVIntentAndNavigationFilter.d @@ -0,0 +1,20 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDV.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAppDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWhitelist.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVTimer.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVIntentAndNavigationFilter.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVIntentAndNavigationFilter.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVIntentAndNavigationFilter.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVIntentAndNavigationFilter.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVIntentAndNavigationFilter.o new file mode 100644 index 0000000..57aab22 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVIntentAndNavigationFilter.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVInvokedUrlCommand.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVInvokedUrlCommand.d new file mode 100644 index 0000000..d44a6c6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVInvokedUrlCommand.d @@ -0,0 +1,4 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVJSON_private.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVInvokedUrlCommand.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVInvokedUrlCommand.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVInvokedUrlCommand.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVInvokedUrlCommand.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVInvokedUrlCommand.o new file mode 100644 index 0000000..082278d Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVInvokedUrlCommand.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVJSON_private.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVJSON_private.d new file mode 100644 index 0000000..94d520e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVJSON_private.d @@ -0,0 +1,3 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVJSON_private.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVJSON_private.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVJSON_private.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVJSON_private.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVJSON_private.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVJSON_private.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVJSON_private.o new file mode 100644 index 0000000..72391f1 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVJSON_private.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVLocalStorage.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVLocalStorage.d new file mode 100644 index 0000000..5010a12 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVLocalStorage.d @@ -0,0 +1,20 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDV.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAppDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWhitelist.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVTimer.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVLocalStorage.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVLocalStorage.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVLocalStorage.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVLocalStorage.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVLocalStorage.o new file mode 100644 index 0000000..40425a5 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVLocalStorage.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin+Resources.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin+Resources.d new file mode 100644 index 0000000..232339c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin+Resources.d @@ -0,0 +1,11 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin+Resources.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin+Resources.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin+Resources.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin+Resources.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin+Resources.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin+Resources.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin+Resources.o new file mode 100644 index 0000000..e02d1c5 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin+Resources.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin.d new file mode 100644 index 0000000..7b8cab4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin.d @@ -0,0 +1,15 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVPlugin+Private.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin+Resources.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin.o new file mode 100644 index 0000000..59eae3a Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPluginResult.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPluginResult.d new file mode 100644 index 0000000..a0e76c5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPluginResult.d @@ -0,0 +1,7 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVJSON_private.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVDebug.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPluginResult.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPluginResult.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPluginResult.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPluginResult.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPluginResult.o new file mode 100644 index 0000000..a5f81be Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPluginResult.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVTimer.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVTimer.d new file mode 100644 index 0000000..13eddca --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVTimer.d @@ -0,0 +1,3 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVTimer.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVTimer.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVTimer.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVTimer.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVTimer.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVTimer.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVTimer.o new file mode 100644 index 0000000..efb9deb Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVTimer.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewDelegate.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewDelegate.d new file mode 100644 index 0000000..6cf379e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewDelegate.d @@ -0,0 +1,5 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewDelegate.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewDelegate.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewDelegate.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewDelegate.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewDelegate.o new file mode 100644 index 0000000..3c0f1a3 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewDelegate.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewEngine.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewEngine.d new file mode 100644 index 0000000..e3a4baa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewEngine.d @@ -0,0 +1,14 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewEngine.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewEngine.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewEngine.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewEngine.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewEngine.o new file mode 100644 index 0000000..1e3ca83 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewEngine.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewNavigationDelegate.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewNavigationDelegate.d new file mode 100644 index 0000000..fc9f259 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewNavigationDelegate.d @@ -0,0 +1,17 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegateImpl.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewNavigationDelegate.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewNavigationDelegate.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewNavigationDelegate.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewNavigationDelegate.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewNavigationDelegate.o new file mode 100644 index 0000000..6324764 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewNavigationDelegate.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVURLProtocol.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVURLProtocol.d new file mode 100644 index 0000000..697f44a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVURLProtocol.d @@ -0,0 +1,14 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVURLProtocol.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVURLProtocol.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVURLProtocol.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVURLProtocol.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVURLProtocol.o new file mode 100644 index 0000000..25585d2 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVURLProtocol.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUserAgentUtil.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUserAgentUtil.d new file mode 100644 index 0000000..d8f1e9a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUserAgentUtil.d @@ -0,0 +1,3 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUserAgentUtil.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUserAgentUtil.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUserAgentUtil.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUserAgentUtil.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUserAgentUtil.o new file mode 100644 index 0000000..dec5f51 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUserAgentUtil.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVViewController.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVViewController.d new file mode 100644 index 0000000..d92893c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVViewController.d @@ -0,0 +1,25 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDV.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAppDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWhitelist.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVTimer.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVPlugin+Private.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVConfigParser.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegateImpl.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVViewController.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVViewController.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVViewController.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVViewController.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVViewController.o new file mode 100644 index 0000000..896370a Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVViewController.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVWhitelist.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVWhitelist.d new file mode 100644 index 0000000..4767c48 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVWhitelist.d @@ -0,0 +1,3 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWhitelist.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWhitelist.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVWhitelist.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVWhitelist.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVWhitelist.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVWhitelist.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVWhitelist.o new file mode 100644 index 0000000..4ba08a2 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVWhitelist.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/Cordova.LinkFileList b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/Cordova.LinkFileList new file mode 100644 index 0000000..73ba67f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/Cordova.LinkFileList @@ -0,0 +1,23 @@ +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVViewController.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSDictionary+CordovaPreferences.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVAppDelegate.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewDelegate.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandDelegateImpl.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVJSON_private.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVWhitelist.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVInvokedUrlCommand.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVTimer.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUserAgentUtil.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVConfigParser.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVGestureHandler.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVHandleOpenURL.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewNavigationDelegate.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSMutableArray+QueueAdditions.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVCommandQueue.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPluginResult.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin+Resources.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVURLProtocol.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVUIWebViewEngine.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVPlugin.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVLocalStorage.o +/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/CDVIntentAndNavigationFilter.o diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSDictionary+CordovaPreferences.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSDictionary+CordovaPreferences.d new file mode 100644 index 0000000..6d2e80b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSDictionary+CordovaPreferences.d @@ -0,0 +1,3 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSDictionary+CordovaPreferences.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSDictionary+CordovaPreferences.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSDictionary+CordovaPreferences.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSDictionary+CordovaPreferences.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSDictionary+CordovaPreferences.o new file mode 100644 index 0000000..acfa1fe Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSDictionary+CordovaPreferences.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSMutableArray+QueueAdditions.d b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSMutableArray+QueueAdditions.d new file mode 100644 index 0000000..715afad --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSMutableArray+QueueAdditions.d @@ -0,0 +1,3 @@ +dependencies: \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.m \ + /Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSMutableArray+QueueAdditions.dia b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSMutableArray+QueueAdditions.dia new file mode 100644 index 0000000..29ccd98 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSMutableArray+QueueAdditions.dia differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSMutableArray+QueueAdditions.o b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSMutableArray+QueueAdditions.o new file mode 100644 index 0000000..c68e526 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/NSMutableArray+QueueAdditions.o differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/dgph b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/dgph new file mode 100644 index 0000000..de68ef7 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/dgph differ 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..ff04fb7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/cordova.js @@ -0,0 +1,1902 @@ +// Platform: ios +// ded62dda172755defaf75378ed007dc05730ec22 +/* + 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.0.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-10106 +function handleBridgeChange() { + if (execProxy !== cordovaExec()) { + 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/shaz/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/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/static/server.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/static/server.js new file mode 100755 index 0000000..80cea43 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/static/server.js @@ -0,0 +1,4 @@ +var http = require('http'); +var ecstatic = require('ecstatic')(__dirname); +var server = http.createServer(ecstatic); +server.listen(8000); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/stream/object.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/stream/object.js new file mode 100755 index 0000000..8f77f0f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/stream/object.js @@ -0,0 +1,10 @@ +var test = require('../../'); +var path = require('path'); + +test.createStream({ objectMode: true }).on('data', function (row) { + console.log(JSON.stringify(row)) +}); + +process.argv.slice(2).forEach(function (file) { + require(path.resolve(file)); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/stream/tap.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/stream/tap.js new file mode 100755 index 0000000..9ea9ff7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/stream/tap.js @@ -0,0 +1,8 @@ +var test = require('../../'); +var path = require('path'); + +test.createStream().pipe(process.stdout); + +process.argv.slice(2).forEach(function (file) { + require(path.resolve(file)); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/stream/test/x.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/stream/test/x.js new file mode 100755 index 0000000..7dbb98a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/stream/test/x.js @@ -0,0 +1,5 @@ +var test = require('../../../'); +test(function (t) { + t.plan(1); + t.equal('beep', 'boop'); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/stream/test/y.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/stream/test/y.js new file mode 100755 index 0000000..28606d5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/stream/test/y.js @@ -0,0 +1,11 @@ +var test = require('../../../'); +test(function (t) { + t.plan(2); + t.equal(1+1, 2); + t.ok(true); +}); + +test('wheee', function (t) { + t.ok(true); + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/throw.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/throw.js new file mode 100755 index 0000000..9a69ec0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/throw.js @@ -0,0 +1,10 @@ +var falafel = require('falafel'); +var test = require('../'); + +test('throw', function (t) { + t.plan(2); + + setTimeout(function () { + throw new Error('doom'); + }, 100); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/timing.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/timing.js new file mode 100755 index 0000000..0268dc7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/timing.js @@ -0,0 +1,12 @@ +var test = require('../'); + +test('timing test', function (t) { + t.plan(2); + + t.equal(typeof Date.now, 'function'); + var start = new Date; + + setTimeout(function () { + t.equal(new Date - start, 100); + }, 100); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/too_many.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/too_many.js new file mode 100755 index 0000000..ee285fb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/too_many.js @@ -0,0 +1,35 @@ +var falafel = require('falafel'); +var test = require('../'); + +test('array', function (t) { + t.plan(3); + + var src = '(' + function () { + var xs = [ 1, 2, [ 3, 4 ] ]; + var ys = [ 5, 6 ]; + g([ xs, ys ]); + } + ')()'; + + var output = falafel(src, function (node) { + if (node.type === 'ArrayExpression') { + node.update('fn(' + node.source() + ')'); + } + }); + + var arrays = [ + [ 3, 4 ], + [ 1, 2, [ 3, 4 ] ], + [ 5, 6 ], + [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], + ]; + + Function(['fn','g'], output)( + function (xs) { + t.same(arrays.shift(), xs); + return xs; + }, + function (xs) { + t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); + } + ); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/two.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/two.js new file mode 100755 index 0000000..78e49c3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/example/two.js @@ -0,0 +1,18 @@ +var test = require('../'); + +test('one', function (t) { + t.plan(2); + t.ok(true); + setTimeout(function () { + t.equal(1+3, 4); + }, 100); +}); + +test('two', function (t) { + t.plan(3); + t.equal(5, 2+3); + setTimeout(function () { + t.equal('a'.charCodeAt(0), 97); + t.ok(true); + }, 50); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/index.js new file mode 100755 index 0000000..a44daf9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/index.js @@ -0,0 +1,140 @@ +var defined = require('defined'); +var createDefaultStream = require('./lib/default_stream'); +var Test = require('./lib/test'); +var createResult = require('./lib/results'); +var through = require('through'); + +var canEmitExit = typeof process !== 'undefined' && process + && typeof process.on === 'function' && process.browser !== true +; +var canExit = typeof process !== 'undefined' && process + && typeof process.exit === 'function' +; + +var nextTick = typeof setImmediate !== 'undefined' + ? setImmediate + : process.nextTick +; + +exports = module.exports = (function () { + var harness; + var lazyLoad = function () { + return getHarness().apply(this, arguments); + }; + + lazyLoad.only = function () { + return getHarness().only.apply(this, arguments); + }; + + lazyLoad.createStream = function (opts) { + if (!opts) opts = {}; + if (!harness) { + var output = through(); + getHarness({ stream: output, objectMode: opts.objectMode }); + return output; + } + return harness.createStream(opts); + }; + + return lazyLoad + + function getHarness (opts) { + if (!opts) opts = {}; + opts.autoclose = !canEmitExit; + if (!harness) harness = createExitHarness(opts); + return harness; + } +})(); + +function createExitHarness (conf) { + if (!conf) conf = {}; + var harness = createHarness({ + autoclose: defined(conf.autoclose, false) + }); + + var stream = harness.createStream({ objectMode: conf.objectMode }); + var es = stream.pipe(conf.stream || createDefaultStream()); + if (canEmitExit) { + es.on('error', function (err) { harness._exitCode = 1 }); + } + + var ended = false; + stream.on('end', function () { ended = true }); + + if (conf.exit === false) return harness; + if (!canEmitExit || !canExit) return harness; + + var inErrorState = false; + + process.on('exit', function (code) { + // let the process exit cleanly. + if (code !== 0) { + return + } + + if (!ended) { + var only = harness._results._only; + for (var i = 0; i < harness._tests.length; i++) { + var t = harness._tests[i]; + if (only && t.name !== only) continue; + t._exit(); + } + } + harness.close(); + process.exit(code || harness._exitCode); + }); + + return harness; +} + +exports.createHarness = createHarness; +exports.Test = Test; +exports.test = exports; // tap compat +exports.test.skip = Test.skip; + +var exitInterval; + +function createHarness (conf_) { + if (!conf_) conf_ = {}; + var results = createResult(); + if (conf_.autoclose !== false) { + results.once('done', function () { results.close() }); + } + + var test = function (name, conf, cb) { + var t = new Test(name, conf, cb); + test._tests.push(t); + + (function inspectCode (st) { + st.on('test', function sub (st_) { + inspectCode(st_); + }); + st.on('result', function (r) { + if (!r.ok) test._exitCode = 1 + }); + })(t); + + results.push(t); + return t; + }; + test._results = results; + + test._tests = []; + + test.createStream = function (opts) { + return results.createStream(opts); + }; + + var only = false; + test.only = function (name) { + if (only) throw new Error('there can only be one only test'); + results.only(name); + only = true; + return test.apply(null, arguments); + }; + test._exitCode = 0; + + test.close = function () { results.close() }; + + return test; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/lib/default_stream.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/lib/default_stream.js new file mode 100755 index 0000000..c8e9918 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/lib/default_stream.js @@ -0,0 +1,31 @@ +var through = require('through'); +var fs = require('fs'); + +module.exports = function () { + var line = ''; + var stream = through(write, flush); + return stream; + + function write (buf) { + for (var i = 0; i < buf.length; i++) { + var c = typeof buf === 'string' + ? buf.charAt(i) + : String.fromCharCode(buf[i]) + ; + if (c === '\n') flush(); + else line += c; + } + } + + function flush () { + if (fs.writeSync && /^win/.test(process.platform)) { + try { fs.writeSync(1, line + '\n'); } + catch (e) { stream.emit('error', e) } + } + else { + try { console.log(line) } + catch (e) { stream.emit('error', e) } + } + line = ''; + } +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/lib/results.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/lib/results.js new file mode 100755 index 0000000..fa414f4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/lib/results.js @@ -0,0 +1,189 @@ +var EventEmitter = require('events').EventEmitter; +var inherits = require('inherits'); +var through = require('through'); +var resumer = require('resumer'); +var inspect = require('object-inspect'); +var nextTick = typeof setImmediate !== 'undefined' + ? setImmediate + : process.nextTick +; + +module.exports = Results; +inherits(Results, EventEmitter); + +function Results () { + if (!(this instanceof Results)) return new Results; + this.count = 0; + this.fail = 0; + this.pass = 0; + this._stream = through(); + this.tests = []; +} + +Results.prototype.createStream = function (opts) { + if (!opts) opts = {}; + var self = this; + var output, testId = 0; + if (opts.objectMode) { + output = through(); + self.on('_push', function ontest (t, extra) { + if (!extra) extra = {}; + var id = testId++; + t.once('prerun', function () { + var row = { + type: 'test', + name: t.name, + id: id + }; + if (has(extra, 'parent')) { + row.parent = extra.parent; + } + output.queue(row); + }); + t.on('test', function (st) { + ontest(st, { parent: id }); + }); + t.on('result', function (res) { + res.test = id; + res.type = 'assert'; + output.queue(res); + }); + t.on('end', function () { + output.queue({ type: 'end', test: id }); + }); + }); + self.on('done', function () { output.queue(null) }); + } + else { + output = resumer(); + output.queue('TAP version 13\n'); + self._stream.pipe(output); + } + + nextTick(function next() { + var t; + while (t = getNextTest(self)) { + t.run(); + if (!t.ended) return t.once('end', function(){ nextTick(next); }); + } + self.emit('done'); + }); + + return output; +}; + +Results.prototype.push = function (t) { + var self = this; + self.tests.push(t); + self._watch(t); + self.emit('_push', t); +}; + +Results.prototype.only = function (name) { + if (this._only) { + self.count ++; + self.fail ++; + write('not ok ' + self.count + ' already called .only()\n'); + } + this._only = name; +}; + +Results.prototype._watch = function (t) { + var self = this; + var write = function (s) { self._stream.queue(s) }; + t.once('prerun', function () { + write('# ' + t.name + '\n'); + }); + + t.on('result', function (res) { + if (typeof res === 'string') { + write('# ' + res + '\n'); + return; + } + write(encodeResult(res, self.count + 1)); + self.count ++; + + if (res.ok) self.pass ++ + else self.fail ++ + }); + + t.on('test', function (st) { self._watch(st) }); +}; + +Results.prototype.close = function () { + var self = this; + if (self.closed) self._stream.emit('error', new Error('ALREADY CLOSED')); + self.closed = true; + var write = function (s) { self._stream.queue(s) }; + + write('\n1..' + self.count + '\n'); + write('# tests ' + self.count + '\n'); + write('# pass ' + self.pass + '\n'); + if (self.fail) write('# fail ' + self.fail + '\n') + else write('\n# ok\n') + + self._stream.queue(null); +}; + +function encodeResult (res, count) { + var output = ''; + output += (res.ok ? 'ok ' : 'not ok ') + count; + output += res.name ? ' ' + res.name.toString().replace(/\s+/g, ' ') : ''; + + if (res.skip) output += ' # SKIP'; + else if (res.todo) output += ' # TODO'; + + output += '\n'; + if (res.ok) return output; + + var outer = ' '; + var inner = outer + ' '; + output += outer + '---\n'; + output += inner + 'operator: ' + res.operator + '\n'; + + if (has(res, 'expected') || has(res, 'actual')) { + var ex = inspect(res.expected); + var ac = inspect(res.actual); + + if (Math.max(ex.length, ac.length) > 65) { + output += inner + 'expected:\n' + inner + ' ' + ex + '\n'; + output += inner + 'actual:\n' + inner + ' ' + ac + '\n'; + } + else { + output += inner + 'expected: ' + ex + '\n'; + output += inner + 'actual: ' + ac + '\n'; + } + } + if (res.at) { + output += inner + 'at: ' + res.at + '\n'; + } + if (res.operator === 'error' && res.actual && res.actual.stack) { + var lines = String(res.actual.stack).split('\n'); + output += inner + 'stack:\n'; + output += inner + ' ' + lines[0] + '\n'; + for (var i = 1; i < lines.length; i++) { + output += inner + lines[i] + '\n'; + } + } + + output += outer + '...\n'; + return output; +} + +function getNextTest (results) { + if (!results._only) { + return results.tests.shift(); + } + + do { + var t = results.tests.shift(); + if (!t) continue; + if (results._only === t.name) { + return t; + } + } while (results.tests.length !== 0) +} + +function has (obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/lib/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/lib/test.js new file mode 100755 index 0000000..b9d6111 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/lib/test.js @@ -0,0 +1,496 @@ +var deepEqual = require('deep-equal'); +var defined = require('defined'); +var path = require('path'); +var inherits = require('inherits'); +var EventEmitter = require('events').EventEmitter; + +module.exports = Test; + +var nextTick = typeof setImmediate !== 'undefined' + ? setImmediate + : process.nextTick +; + +inherits(Test, EventEmitter); + +var getTestArgs = function (name_, opts_, cb_) { + var name = '(anonymous)'; + var opts = {}; + var cb; + + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + var t = typeof arg; + if (t === 'string') { + name = arg; + } + else if (t === 'object') { + opts = arg || opts; + } + else if (t === 'function') { + cb = arg; + } + } + return { name: name, opts: opts, cb: cb }; +}; + +function Test (name_, opts_, cb_) { + if (! (this instanceof Test)) { + return new Test(name_, opts_, cb_); + } + + var args = getTestArgs(name_, opts_, cb_); + + this.readable = true; + this.name = args.name || '(anonymous)'; + this.assertCount = 0; + this.pendingCount = 0; + this._skip = args.opts.skip || false; + this._plan = undefined; + this._cb = args.cb; + this._progeny = []; + this._ok = true; + + if (args.opts.timeout !== undefined) { + this.timeoutAfter(args.opts.timeout); + } + + for (var prop in this) { + this[prop] = (function bind(self, val) { + if (typeof val === 'function') { + return function bound() { + return val.apply(self, arguments); + }; + } + else return val; + })(this, this[prop]); + } +} + +Test.prototype.run = function () { + if (!this._cb || this._skip) { + return this._end(); + } + this.emit('prerun'); + this._cb(this); + this.emit('run'); +}; + +Test.prototype.test = function (name, opts, cb) { + var self = this; + var t = new Test(name, opts, cb); + this._progeny.push(t); + this.pendingCount++; + this.emit('test', t); + t.on('prerun', function () { + self.assertCount++; + }) + + if (!self._pendingAsserts()) { + nextTick(function () { + self._end(); + }); + } + + nextTick(function() { + if (!self._plan && self.pendingCount == self._progeny.length) { + self._end(); + } + }); +}; + +Test.prototype.comment = function (msg) { + this.emit('result', msg.trim().replace(/^#\s*/, '')); +}; + +Test.prototype.plan = function (n) { + this._plan = n; + this.emit('plan', n); +}; + +Test.prototype.timeoutAfter = function(ms) { + if (!ms) throw new Error('timeoutAfter requires a timespan'); + var self = this; + var timeout = setTimeout(function() { + self.fail('test timed out after ' + ms + 'ms'); + self.end(); + }, ms); + this.once('end', function() { + clearTimeout(timeout); + }); +} + +Test.prototype.end = function (err) { + var self = this; + if (arguments.length >= 1) { + this.ifError(err); + } + + if (this.calledEnd) { + this.fail('.end() called twice'); + } + this.calledEnd = true; + this._end(); +}; + +Test.prototype._end = function (err) { + var self = this; + if (this._progeny.length) { + var t = this._progeny.shift(); + t.on('end', function () { self._end() }); + t.run(); + return; + } + + if (!this.ended) this.emit('end'); + var pendingAsserts = this._pendingAsserts(); + if (!this._planError && this._plan !== undefined && pendingAsserts) { + this._planError = true; + this.fail('plan != count', { + expected : this._plan, + actual : this.assertCount + }); + } + this.ended = true; +}; + +Test.prototype._exit = function () { + if (this._plan !== undefined && + !this._planError && this.assertCount !== this._plan) { + this._planError = true; + this.fail('plan != count', { + expected : this._plan, + actual : this.assertCount, + exiting : true + }); + } + else if (!this.ended) { + this.fail('test exited without ending', { + exiting: true + }); + } +}; + +Test.prototype._pendingAsserts = function () { + if (this._plan === undefined) { + return 1; + } + else { + return this._plan - (this._progeny.length + this.assertCount); + } +}; + +Test.prototype._assert = function assert (ok, opts) { + var self = this; + var extra = opts.extra || {}; + + var res = { + id : self.assertCount ++, + ok : Boolean(ok), + skip : defined(extra.skip, opts.skip), + name : defined(extra.message, opts.message, '(unnamed assert)'), + operator : defined(extra.operator, opts.operator) + }; + if (has(opts, 'actual') || has(extra, 'actual')) { + res.actual = defined(extra.actual, opts.actual); + } + if (has(opts, 'expected') || has(extra, 'expected')) { + res.expected = defined(extra.expected, opts.expected); + } + this._ok = Boolean(this._ok && ok); + + if (!ok) { + res.error = defined(extra.error, opts.error, new Error(res.name)); + } + + if (!ok) { + var e = new Error('exception'); + var err = (e.stack || '').split('\n'); + var dir = path.dirname(__dirname) + '/'; + + for (var i = 0; i < err.length; i++) { + var m = /^[^\s]*\s*\bat\s+(.+)/.exec(err[i]); + if (!m) { + continue; + } + + var s = m[1].split(/\s+/); + var filem = /(\/[^:\s]+:(\d+)(?::(\d+))?)/.exec(s[1]); + if (!filem) { + filem = /(\/[^:\s]+:(\d+)(?::(\d+))?)/.exec(s[2]); + + if (!filem) { + filem = /(\/[^:\s]+:(\d+)(?::(\d+))?)/.exec(s[3]); + + if (!filem) { + continue; + } + } + } + + if (filem[1].slice(0, dir.length) === dir) { + continue; + } + + res.functionName = s[0]; + res.file = filem[1]; + res.line = Number(filem[2]); + if (filem[3]) res.column = filem[3]; + + res.at = m[1]; + break; + } + } + + self.emit('result', res); + + var pendingAsserts = self._pendingAsserts(); + if (!pendingAsserts) { + if (extra.exiting) { + self._end(); + } else { + nextTick(function () { + self._end(); + }); + } + } + + if (!self._planError && pendingAsserts < 0) { + self._planError = true; + self.fail('plan != count', { + expected : self._plan, + actual : self._plan - pendingAsserts + }); + } +}; + +Test.prototype.fail = function (msg, extra) { + this._assert(false, { + message : msg, + operator : 'fail', + extra : extra + }); +}; + +Test.prototype.pass = function (msg, extra) { + this._assert(true, { + message : msg, + operator : 'pass', + extra : extra + }); +}; + +Test.prototype.skip = function (msg, extra) { + this._assert(true, { + message : msg, + operator : 'skip', + skip : true, + extra : extra + }); +}; + +Test.prototype.ok += Test.prototype['true'] += Test.prototype.assert += function (value, msg, extra) { + this._assert(value, { + message : msg, + operator : 'ok', + expected : true, + actual : value, + extra : extra + }); +}; + +Test.prototype.notOk += Test.prototype['false'] += Test.prototype.notok += function (value, msg, extra) { + this._assert(!value, { + message : msg, + operator : 'notOk', + expected : false, + actual : value, + extra : extra + }); +}; + +Test.prototype.error += Test.prototype.ifError += Test.prototype.ifErr += Test.prototype.iferror += function (err, msg, extra) { + this._assert(!err, { + message : defined(msg, String(err)), + operator : 'error', + actual : err, + extra : extra + }); +}; + +Test.prototype.equal += Test.prototype.equals += Test.prototype.isEqual += Test.prototype.is += Test.prototype.strictEqual += Test.prototype.strictEquals += function (a, b, msg, extra) { + this._assert(a === b, { + message : defined(msg, 'should be equal'), + operator : 'equal', + actual : a, + expected : b, + extra : extra + }); +}; + +Test.prototype.notEqual += Test.prototype.notEquals += Test.prototype.notStrictEqual += Test.prototype.notStrictEquals += Test.prototype.isNotEqual += Test.prototype.isNot += Test.prototype.not += Test.prototype.doesNotEqual += Test.prototype.isInequal += function (a, b, msg, extra) { + this._assert(a !== b, { + message : defined(msg, 'should not be equal'), + operator : 'notEqual', + actual : a, + notExpected : b, + extra : extra + }); +}; + +Test.prototype.deepEqual += Test.prototype.deepEquals += Test.prototype.isEquivalent += Test.prototype.same += function (a, b, msg, extra) { + this._assert(deepEqual(a, b, { strict: true }), { + message : defined(msg, 'should be equivalent'), + operator : 'deepEqual', + actual : a, + expected : b, + extra : extra + }); +}; + +Test.prototype.deepLooseEqual += Test.prototype.looseEqual += Test.prototype.looseEquals += function (a, b, msg, extra) { + this._assert(deepEqual(a, b), { + message : defined(msg, 'should be equivalent'), + operator : 'deepLooseEqual', + actual : a, + expected : b, + extra : extra + }); +}; + +Test.prototype.notDeepEqual += Test.prototype.notEquivalent += Test.prototype.notDeeply += Test.prototype.notSame += Test.prototype.isNotDeepEqual += Test.prototype.isNotDeeply += Test.prototype.isNotEquivalent += Test.prototype.isInequivalent += function (a, b, msg, extra) { + this._assert(!deepEqual(a, b, { strict: true }), { + message : defined(msg, 'should not be equivalent'), + operator : 'notDeepEqual', + actual : a, + notExpected : b, + extra : extra + }); +}; + +Test.prototype.notDeepLooseEqual += Test.prototype.notLooseEqual += Test.prototype.notLooseEquals += function (a, b, msg, extra) { + this._assert(!deepEqual(a, b), { + message : defined(msg, 'should be equivalent'), + operator : 'notDeepLooseEqual', + actual : a, + expected : b, + extra : extra + }); +}; + +Test.prototype['throws'] = function (fn, expected, msg, extra) { + if (typeof expected === 'string') { + msg = expected; + expected = undefined; + } + + var caught = undefined; + + try { + fn(); + } catch (err) { + caught = { error : err }; + var message = err.message; + delete err.message; + err.message = message; + } + + var passed = caught; + + if (expected instanceof RegExp) { + passed = expected.test(caught && caught.error); + expected = String(expected); + } + + if (typeof expected === 'function') { + passed = caught.error instanceof expected; + caught.error = caught.error.constructor; + } + + this._assert(passed, { + message : defined(msg, 'should throw'), + operator : 'throws', + actual : caught && caught.error, + expected : expected, + error: !passed && caught && caught.error, + extra : extra + }); +}; + +Test.prototype.doesNotThrow = function (fn, expected, msg, extra) { + if (typeof expected === 'string') { + msg = expected; + expected = undefined; + } + var caught = undefined; + try { + fn(); + } + catch (err) { + caught = { error : err }; + } + this._assert(!caught, { + message : defined(msg, 'should not throw'), + operator : 'throws', + actual : caught && caught.error, + expected : expected, + error : caught && caught.error, + extra : extra + }); +}; + +function has (obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +Test.skip = function (name_, _opts, _cb) { + var args = getTestArgs.apply(null, arguments); + args.opts.skip = true; + return Test(args.name, args.opts, args.cb); +}; + +// vim: set softtabstop=4 shiftwidth=4: + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/.travis.yml new file mode 100755 index 0000000..f1d0f13 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/.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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/LICENSE new file mode 100755 index 0000000..ee27ba4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/example/cmp.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/example/cmp.js new file mode 100755 index 0000000..67014b8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/example/cmp.js @@ -0,0 +1,11 @@ +var equal = require('../'); +console.dir([ + equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + ), + equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + ) +]); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/index.js new file mode 100755 index 0000000..dbc11f2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/index.js @@ -0,0 +1,94 @@ +var pSlice = Array.prototype.slice; +var objectKeys = require('./lib/keys.js'); +var isArguments = require('./lib/is_arguments.js'); + +var deepEqual = module.exports = function (actual, expected, opts) { + if (!opts) opts = {}; + // 7.1. All identical values are equivalent, as determined by ===. + if (actual === expected) { + return true; + + } else if (actual instanceof Date && expected instanceof Date) { + return actual.getTime() === expected.getTime(); + + // 7.3. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if (typeof actual != 'object' && typeof expected != 'object') { + return opts.strict ? actual === expected : actual == expected; + + // 7.4. For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else { + return objEquiv(actual, expected, opts); + } +} + +function isUndefinedOrNull(value) { + return value === null || value === undefined; +} + +function isBuffer (x) { + if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false; + if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { + return false; + } + if (x.length > 0 && typeof x[0] !== 'number') return false; + return true; +} + +function objEquiv(a, b, opts) { + var i, key; + if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) + return false; + // an identical 'prototype' property. + if (a.prototype !== b.prototype) return false; + //~~~I've managed to break Object.keys through screwy arguments passing. + // Converting to array solves the problem. + if (isArguments(a)) { + if (!isArguments(b)) { + return false; + } + a = pSlice.call(a); + b = pSlice.call(b); + return deepEqual(a, b, opts); + } + if (isBuffer(a)) { + if (!isBuffer(b)) { + return false; + } + if (a.length !== b.length) return false; + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) return false; + } + return true; + } + try { + var ka = objectKeys(a), + kb = objectKeys(b); + } catch (e) {//happens when one is a string literal and the other isn't + return false; + } + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length != kb.length) + return false; + //the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + //~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) + return false; + } + //equivalent values for every corresponding key, and + //~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!deepEqual(a[key], b[key], opts)) return false; + } + return typeof a === typeof b; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/lib/is_arguments.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/lib/is_arguments.js new file mode 100755 index 0000000..1ff150f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/lib/is_arguments.js @@ -0,0 +1,20 @@ +var supportsArgumentsClass = (function(){ + return Object.prototype.toString.call(arguments) +})() == '[object Arguments]'; + +exports = module.exports = supportsArgumentsClass ? supported : unsupported; + +exports.supported = supported; +function supported(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; +}; + +exports.unsupported = unsupported; +function unsupported(object){ + return object && + typeof object == 'object' && + typeof object.length == 'number' && + Object.prototype.hasOwnProperty.call(object, 'callee') && + !Object.prototype.propertyIsEnumerable.call(object, 'callee') || + false; +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/lib/keys.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/lib/keys.js new file mode 100755 index 0000000..13af263 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/lib/keys.js @@ -0,0 +1,9 @@ +exports = module.exports = typeof Object.keys === 'function' + ? Object.keys : shim; + +exports.shim = shim; +function shim (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/package.json new file mode 100755 index 0000000..97e0572 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/package.json @@ -0,0 +1,84 @@ +{ + "name": "deep-equal", + "version": "0.2.2", + "description": "node's assert.deepEqual algorithm", + "main": "index.js", + "directories": { + "lib": ".", + "example": "example", + "test": "test" + }, + "scripts": { + "test": "tape test/*.js" + }, + "devDependencies": { + "tape": "^3.5.0" + }, + "repository": { + "type": "git", + "url": "http://github.com/substack/node-deep-equal.git" + }, + "keywords": [ + "equality", + "equal", + "compare" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "testling": { + "files": "test/*.js", + "browsers": { + "ie": [ + 6, + 7, + 8, + 9 + ], + "ff": [ + 3.5, + 10, + 15 + ], + "chrome": [ + 10, + 22 + ], + "safari": [ + 5.1 + ], + "opera": [ + 12 + ] + } + }, + "gitHead": "05cd26a25f0d7babf0c2758827b4dafec9d0582e", + "bugs": { + "url": "https://github.com/substack/node-deep-equal/issues" + }, + "homepage": "https://github.com/substack/node-deep-equal", + "_id": "deep-equal@0.2.2", + "_shasum": "84b745896f34c684e98f2ce0e42abaf43bba017d", + "_from": "deep-equal@~0.2.0", + "_npmVersion": "2.3.0", + "_nodeVersion": "0.10.35", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "dist": { + "shasum": "84b745896f34c684e98f2ce0e42abaf43bba017d", + "tarball": "http://registry.npmjs.org/deep-equal/-/deep-equal-0.2.2.tgz" + }, + "_resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.2.2.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/readme.markdown b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/readme.markdown new file mode 100755 index 0000000..f489c2a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/readme.markdown @@ -0,0 +1,61 @@ +# deep-equal + +Node's `assert.deepEqual() algorithm` as a standalone module. + +This module is around [5 times faster](https://gist.github.com/2790507) +than wrapping `assert.deepEqual()` in a `try/catch`. + +[![browser support](https://ci.testling.com/substack/node-deep-equal.png)](https://ci.testling.com/substack/node-deep-equal) + +[![build status](https://secure.travis-ci.org/substack/node-deep-equal.png)](https://travis-ci.org/substack/node-deep-equal) + +# example + +``` js +var equal = require('deep-equal'); +console.dir([ + equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + ), + equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + ) +]); +``` + +# methods + +``` js +var deepEqual = require('deep-equal') +``` + +## deepEqual(a, b, opts) + +Compare objects `a` and `b`, returning whether they are equal according to a +recursive equality algorithm. + +If `opts.strict` is `true`, use strict equality (`===`) to compare leaf nodes. +The default is to use coercive equality (`==`) because that's how +`assert.deepEqual()` works by default. + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install deep-equal +``` + +# test + +With [npm](http://npmjs.org) do: + +``` +npm test +``` + +# license + +MIT. Derived largely from node's assert module. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/test/cmp.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/test/cmp.js new file mode 100755 index 0000000..d141256 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/deep-equal/test/cmp.js @@ -0,0 +1,89 @@ +var test = require('tape'); +var equal = require('../'); +var isArguments = require('../lib/is_arguments.js'); +var objectKeys = require('../lib/keys.js'); + +test('equal', function (t) { + t.ok(equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + )); + t.end(); +}); + +test('not equal', function (t) { + t.notOk(equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + )); + t.end(); +}); + +test('nested nulls', function (t) { + t.ok(equal([ null, null, null ], [ null, null, null ])); + t.end(); +}); + +test('strict equal', function (t) { + t.notOk(equal( + [ { a: 3 }, { b: 4 } ], + [ { a: '3' }, { b: '4' } ], + { strict: true } + )); + t.end(); +}); + +test('non-objects', function (t) { + t.ok(equal(3, 3)); + t.ok(equal('beep', 'beep')); + t.ok(equal('3', 3)); + t.notOk(equal('3', 3, { strict: true })); + t.notOk(equal('3', [3])); + t.end(); +}); + +test('arguments class', function (t) { + t.ok(equal( + (function(){return arguments})(1,2,3), + (function(){return arguments})(1,2,3), + "compares arguments" + )); + t.notOk(equal( + (function(){return arguments})(1,2,3), + [1,2,3], + "differenciates array and arguments" + )); + t.end(); +}); + +test('test the arguments shim', function (t) { + t.ok(isArguments.supported((function(){return arguments})())); + t.notOk(isArguments.supported([1,2,3])); + + t.ok(isArguments.unsupported((function(){return arguments})())); + t.notOk(isArguments.unsupported([1,2,3])); + + t.end(); +}); + +test('test the keys shim', function (t) { + t.deepEqual(objectKeys.shim({ a: 1, b : 2 }), [ 'a', 'b' ]); + t.end(); +}); + +test('dates', function (t) { + var d0 = new Date(1387585278000); + var d1 = new Date('Fri Dec 20 2013 16:21:18 GMT-0800 (PST)'); + t.ok(equal(d0, d1)); + t.end(); +}); + +test('buffers', function (t) { + t.ok(equal(Buffer('xyz'), Buffer('xyz'))); + t.end(); +}); + +test('booleans and arrays', function (t) { + t.notOk(equal(true, [])); + t.end(); +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/.travis.yml new file mode 100755 index 0000000..895dbd3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/LICENSE new file mode 100755 index 0000000..ee27ba4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/example/defined.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/example/defined.js new file mode 100755 index 0000000..7b5d982 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/example/defined.js @@ -0,0 +1,4 @@ +var defined = require('../'); +var opts = { y : false, w : 4 }; +var x = defined(opts.x, opts.y, opts.w, 8); +console.log(x); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/index.js new file mode 100755 index 0000000..f8a2219 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/index.js @@ -0,0 +1,5 @@ +module.exports = function () { + for (var i = 0; i < arguments.length; i++) { + if (arguments[i] !== undefined) return arguments[i]; + } +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/package.json new file mode 100755 index 0000000..2452447 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/package.json @@ -0,0 +1,60 @@ +{ + "name": "defined", + "version": "0.0.0", + "description": "return the first argument that is `!== undefined`", + "main": "index.js", + "directories": { + "example": "example", + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "~0.3.0", + "tape": "~0.0.2" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/defined.git" + }, + "homepage": "https://github.com/substack/defined", + "keywords": [ + "undefined", + "short-circuit", + "||", + "or", + "//", + "defined-or" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "_id": "defined@0.0.0", + "dist": { + "shasum": "f35eea7d705e933baf13b2f03b3f83d921403b3e", + "tarball": "http://registry.npmjs.org/defined/-/defined-0.0.0.tgz" + }, + "_npmVersion": "1.1.59", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "_shasum": "f35eea7d705e933baf13b2f03b3f83d921403b3e", + "_from": "defined@~0.0.0", + "_resolved": "https://registry.npmjs.org/defined/-/defined-0.0.0.tgz", + "bugs": { + "url": "https://github.com/substack/defined/issues" + }, + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/readme.markdown b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/readme.markdown new file mode 100755 index 0000000..2280351 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/readme.markdown @@ -0,0 +1,51 @@ +# defined + +return the first argument that is `!== undefined` + +[![build status](https://secure.travis-ci.org/substack/defined.png)](http://travis-ci.org/substack/defined) + +Most of the time when I chain together `||`s, I actually just want the first +item that is not `undefined`, not the first non-falsy item. + +This module is like the defined-or (`//`) operator in perl 5.10+. + +# example + +``` js +var defined = require('defined'); +var opts = { y : false, w : 4 }; +var x = defined(opts.x, opts.y, opts.w, 100); +console.log(x); +``` + +``` +$ node example/defined.js +false +``` + +The return value is `false` because `false` is the first item that is +`!== undefined`. + +# methods + +``` js +var defined = require('defined') +``` + +## var x = defined(a, b, c...) + +Return the first item in the argument list `a, b, c...` that is `!== undefined`. + +If all the items are `=== undefined`, return undefined. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install defined +``` + +# license + +MIT diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/test/def.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/test/def.js new file mode 100755 index 0000000..48da517 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/defined/test/def.js @@ -0,0 +1,22 @@ +var defined = require('../'); +var test = require('tape'); + +test('defined-or', function (t) { + var u = undefined; + + t.equal(defined(), u, 'empty arguments'); + t.equal(defined(u), u, '1 undefined'); + t.equal(defined(u, u), u, '2 undefined'); + t.equal(defined(u, u, u, u), u, '4 undefineds'); + + t.equal(defined(undefined, false, true), false, 'false[0]'); + t.equal(defined(false, true), false, 'false[1]'); + t.equal(defined(undefined, 0, true), 0, 'zero[0]'); + t.equal(defined(0, true), 0, 'zero[1]'); + + t.equal(defined(3, undefined, 4), 3, 'first arg'); + t.equal(defined(undefined, 3, 4), 3, 'second arg'); + t.equal(defined(undefined, undefined, 3), 3, 'third arg'); + + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/.npmignore new file mode 100755 index 0000000..2af4b71 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/.npmignore @@ -0,0 +1,2 @@ +.*.swp +test/a/ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/.travis.yml new file mode 100755 index 0000000..baa0031 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - 0.8 diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/LICENSE new file mode 100755 index 0000000..0c44ae7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Isaac Z. Schlueter ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. 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. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR CONTRIBUTORS +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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/README.md new file mode 100755 index 0000000..cc69164 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/README.md @@ -0,0 +1,250 @@ +# 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. + +## Attention: node-glob users! + +The API has changed dramatically between 2.x and 3.x. This library is +now 100% JavaScript, and the integer flags have been replaced with an +options object. + +Also, there's an event emitter class, proper tests, and all the other +things you've come to expect from node modules. + +And best of all, no compilation! + +## 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. +}) +``` + +## Features + +Please see the [minimatch +documentation](https://github.com/isaacs/minimatch) for more details. + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` +* [minimatch documentation](https://github.com/isaacs/minimatch) + +## 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 instanting 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. +* `error` The error encountered. When an error is encountered, the + glob object is in an undefined state, and should be discarded. +* `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. +* `statCache` Collection of all the stat results the glob search + performed. +* `cache` Convenience object. Each field has the following possible + values: + * `false` - Path does not exist + * `true` - Path exists + * `1` - Path exists, and is not a directory + * `2` - Path exists, and is a directory + * `[file, entries, ...]` - Path exists, is a directory, and the + array value is the results of `fs.readdir` + +### 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 + +* `abort` Stop the search. + +### 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. + +* `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. It will cause + ELOOP to be triggered one level sooner in the case of cyclical + symbolic links. +* `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.) +* `sync` Perform a synchronous glob search. +* `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). +* `nocase` Perform a case-insensitive match. Note that case-insensitive + filesystems will sometimes result in glob returning results that are + case-insensitively matched anyway, since readdir and stat will not + raise an error. +* `debug` Set to enable debug logging in minimatch and glob. +* `globDebug` Set to enable debug logging in glob, but not minimatch. + +## 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. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +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.1, 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. + +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. + +## 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. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/examples/g.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/examples/g.js new file mode 100755 index 0000000..be122df --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/examples/g.js @@ -0,0 +1,9 @@ +var Glob = require("../").Glob + +var pattern = "test/a/**/[cg]/../[cg]" +console.log(pattern) + +var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) { + console.log("matches", matches) +}) +console.log("after") diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/examples/usr-local.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/examples/usr-local.js new file mode 100755 index 0000000..327a425 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/examples/usr-local.js @@ -0,0 +1,9 @@ +var Glob = require("../").Glob + +var pattern = "{./*/*,/*,/usr/local/*}" +console.log(pattern) + +var mg = new Glob(pattern, {mark: true}, function (er, matches) { + console.log("matches", matches) +}) +console.log("after") diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/glob.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/glob.js new file mode 100755 index 0000000..f646c44 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/glob.js @@ -0,0 +1,728 @@ +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern) +// 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. +// readdir(PREFIX) as ENTRIES +// If fails, END +// 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 .. $]) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $]) +// +// 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") +, minimatch = require("minimatch") +, Minimatch = minimatch.Minimatch +, inherits = require("inherits") +, EE = require("events").EventEmitter +, path = require("path") +, isDir = {} +, assert = require("assert").ok + +function glob (pattern, options, cb) { + if (typeof options === "function") cb = options, options = {} + if (!options) options = {} + + if (typeof options === "number") { + deprecated() + return + } + + var g = new Glob(pattern, options, cb) + return g.sync ? g.found : g +} + +glob.fnmatch = deprecated + +function deprecated () { + throw new Error("glob's interface has changed. Please see the docs.") +} + +glob.sync = globSync +function globSync (pattern, options) { + if (typeof options === "number") { + deprecated() + return + } + + options = options || {} + options.sync = true + return glob(pattern, options) +} + +this._processingEmitQueue = false + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (!(this instanceof Glob)) { + return new Glob(pattern, options, cb) + } + + if (typeof options === "function") { + cb = options + options = null + } + + if (typeof cb === "function") { + this.on("error", cb) + this.on("end", function (matches) { + cb(null, matches) + }) + } + + options = options || {} + + this._endEmitted = false + this.EOF = {} + this._emitQueue = [] + + this.paused = false + this._processingEmitQueue = false + + this.maxDepth = options.maxDepth || 1000 + this.maxLength = options.maxLength || Infinity + this.cache = options.cache || {} + this.statCache = options.statCache || {} + + this.changedCwd = false + var cwd = process.cwd() + if (!options.hasOwnProperty("cwd")) this.cwd = cwd + else { + this.cwd = options.cwd + this.changedCwd = path.resolve(options.cwd) !== cwd + } + + this.root = options.root || path.resolve(this.cwd, "/") + this.root = path.resolve(this.root) + if (process.platform === "win32") + this.root = this.root.replace(/\\/g, "/") + + this.nomount = !!options.nomount + + if (!pattern) { + throw new Error("must provide pattern") + } + + // 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 + } + + this.strict = options.strict !== false + this.dot = !!options.dot + this.mark = !!options.mark + this.sync = !!options.sync + this.nounique = !!options.nounique + this.nonull = !!options.nonull + this.nosort = !!options.nosort + this.nocase = !!options.nocase + this.stat = !!options.stat + + this.debug = !!options.debug || !!options.globDebug + if (this.debug) + this.log = console.error + + this.silent = !!options.silent + + var mm = this.minimatch = new Minimatch(pattern, options) + this.options = mm.options + pattern = this.pattern = mm.pattern + + this.error = null + this.aborted = false + + // list of all the patterns that ** has resolved do, so + // we can avoid visiting multiple times. + this._globstars = {} + + EE.call(this) + + // 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) + + this.minimatch.set.forEach(iterator.bind(this)) + function iterator (pattern, i, set) { + this._process(pattern, 0, i, function (er) { + if (er) this.emit("error", er) + if (-- n <= 0) this._finish() + }) + } +} + +Glob.prototype.log = function () {} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + + var nou = this.nounique + , all = nou ? [] : {} + + for (var i = 0, l = this.matches.length; i < l; i ++) { + var matches = this.matches[i] + this.log("matches[%d] =", i, matches) + // do like the shell, and spit out the literal glob + if (!matches) { + if (this.nonull) { + var literal = this.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 (!this.nosort) { + all = all.sort(this.nocase ? alphasorti : alphasort) + } + + if (this.mark) { + // at *some* point we statted all of these + all = all.map(this._mark, this) + } + + this.log("emitting end", all) + + this.EOF = this.found = all + this.emitMatch(this.EOF) +} + +function alphasorti (a, b) { + a = a.toLowerCase() + b = b.toLowerCase() + return alphasort(a, b) +} + +function alphasort (a, b) { + return a > b ? 1 : a < b ? -1 : 0 +} + +Glob.prototype._mark = function (p) { + var c = this.cache[p] + var m = p + if (c) { + var isDir = c === 2 || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + this.statCache[m] = this.statCache[p] + this.cache[m] = this.cache[p] + } + } + + return m +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit("abort") +} + +Glob.prototype.pause = function () { + if (this.paused) return + if (this.sync) + this.emit("error", new Error("Can't pause/resume sync glob")) + this.paused = true + this.emit("pause") +} + +Glob.prototype.resume = function () { + if (!this.paused) return + if (this.sync) + this.emit("error", new Error("Can't pause/resume sync glob")) + this.paused = false + this.emit("resume") + this._processEmitQueue() + //process.nextTick(this.emit.bind(this, "resume")) +} + +Glob.prototype.emitMatch = function (m) { + this.log('emitMatch', m) + this._emitQueue.push(m) + this._processEmitQueue() +} + +Glob.prototype._processEmitQueue = function (m) { + this.log("pEQ paused=%j processing=%j m=%j", this.paused, + this._processingEmitQueue, m) + var done = false + while (!this._processingEmitQueue && + !this.paused) { + this._processingEmitQueue = true + var m = this._emitQueue.shift() + this.log(">processEmitQueue", m === this.EOF ? ":EOF:" : m) + if (!m) { + this.log(">processEmitQueue, falsey m") + this._processingEmitQueue = false + break + } + + if (m === this.EOF || !(this.mark && !this.stat)) { + this.log("peq: unmarked, or eof") + next.call(this, 0, false) + } else if (this.statCache[m]) { + var sc = this.statCache[m] + var exists + if (sc) + exists = sc.isDirectory() ? 2 : 1 + this.log("peq: stat cached") + next.call(this, exists, exists === 2) + } else { + this.log("peq: _stat, then next") + this._stat(m, next) + } + + function next(exists, isDir) { + this.log("next", m, exists, isDir) + var ev = m === this.EOF ? "end" : "match" + + // "end" can only happen once. + assert(!this._endEmitted) + if (ev === "end") + this._endEmitted = true + + if (exists) { + // Doesn't mean it necessarily doesn't exist, it's possible + // we just didn't check because we don't care that much, or + // this is EOF anyway. + if (isDir && !m.match(/\/$/)) { + m = m + "/" + } else if (!isDir && m.match(/\/$/)) { + m = m.replace(/\/+$/, "") + } + } + this.log("emit", ev, m) + this.emit(ev, m) + this._processingEmitQueue = false + if (done && m !== this.EOF && !this.paused) + this._processEmitQueue() + } + } + done = true +} + +Glob.prototype._process = function (pattern, depth, index, cb_) { + assert(this instanceof Glob) + + var cb = function cb (er, res) { + assert(this instanceof Glob) + if (this.paused) { + if (!this._processQueue) { + this._processQueue = [] + this.once("resume", function () { + var q = this._processQueue + this._processQueue = null + q.forEach(function (cb) { cb() }) + }) + } + this._processQueue.push(cb_.bind(this, er, res)) + } else { + cb_.call(this, er, res) + } + }.bind(this) + + if (this.aborted) return cb() + + if (depth > this.maxDepth) return cb() + + // 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: + prefix = pattern.join("/") + this._stat(prefix, function (exists, isDir) { + // either it's there, or it isn't. + // nothing more to do, either way. + if (exists) { + if (prefix && isAbsolute(prefix) && !this.nomount) { + if (prefix.charAt(0) === "/") { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + } + } + + if (process.platform === "win32") + prefix = prefix.replace(/\\/g, "/") + + this.matches[index] = this.matches[index] || {} + this.matches[index][prefix] = true + this.emitMatch(prefix) + } + return 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) + prefix = prefix.join("/") + break + } + + // get the list of entries. + var read + if (prefix === null) read = "." + else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { + if (!prefix || !isAbsolute(prefix)) { + prefix = path.join("/", prefix) + } + read = prefix = path.resolve(prefix) + + // if (process.platform === "win32") + // read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/") + + this.log('absolute: ', prefix, this.root, pattern, read) + } else { + read = prefix + } + + this.log('readdir(%j)', read, this.cwd, this.root) + + return this._readdir(read, function (er, entries) { + if (er) { + // not a directory! + // this means that, whatever else comes after this, it can never match + return cb() + } + + // globstar is special + if (pattern[n] === minimatch.GLOBSTAR) { + // test without the globstar, and with every child both below + // and replacing the globstar. + var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ] + entries.forEach(function (e) { + if (e.charAt(0) === "." && !this.dot) return + // instead of the globstar + s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))) + // below the globstar + s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n))) + }, this) + + s = s.filter(function (pattern) { + var key = gsKey(pattern) + var seen = !this._globstars[key] + this._globstars[key] = true + return seen + }, this) + + if (!s.length) + return cb() + + // now asyncForEach over this + var l = s.length + , errState = null + s.forEach(function (gsPattern) { + this._process(gsPattern, depth + 1, index, function (er) { + if (errState) return + if (er) return cb(errState = er) + if (--l <= 0) return cb() + }) + }, this) + + return + } + + // not a globstar + // 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 = pattern[n] + var rawGlob = pattern[n]._glob + , dotOk = this.dot || rawGlob.charAt(0) === "." + + entries = entries.filter(function (e) { + return (e.charAt(0) !== "." || dotOk) && + e.match(pattern[n]) + }) + + // If n === pattern.length - 1, then there's no need for the extra stat + // *unless* the user has specified "mark" or "stat" explicitly. + // We know that they exist, since the readdir returned them. + if (n === pattern.length - 1 && + !this.mark && + !this.stat) { + entries.forEach(function (e) { + if (prefix) { + if (prefix !== "/") e = prefix + "/" + e + else e = prefix + e + } + if (e.charAt(0) === "/" && !this.nomount) { + e = path.join(this.root, e) + } + + if (process.platform === "win32") + e = e.replace(/\\/g, "/") + + this.matches[index] = this.matches[index] || {} + this.matches[index][e] = true + this.emitMatch(e) + }, this) + return cb.call(this) + } + + + // now test all the remaining entries as stand-ins for that part + // of the pattern. + var l = entries.length + , errState = null + if (l === 0) return cb() // no matches possible + entries.forEach(function (e) { + var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)) + this._process(p, depth + 1, index, function (er) { + if (errState) return + if (er) return cb(errState = er) + if (--l === 0) return cb.call(this) + }) + }, this) + }) + +} + +function gsKey (pattern) { + return '**' + pattern.map(function (p) { + return (p === minimatch.GLOBSTAR) ? '**' : (''+p) + }).join('/') +} + +Glob.prototype._stat = function (f, cb) { + assert(this instanceof Glob) + var abs = f + if (f.charAt(0) === "/") { + abs = path.join(this.root, f) + } else if (this.changedCwd) { + abs = path.resolve(this.cwd, f) + } + + if (f.length > this.maxLength) { + var er = new Error("Path name too long") + er.code = "ENAMETOOLONG" + er.path = f + return this._afterStat(f, abs, cb, er) + } + + this.log('stat', [this.cwd, f, '=', abs]) + + if (!this.stat && this.cache.hasOwnProperty(f)) { + var exists = this.cache[f] + , isDir = exists && (Array.isArray(exists) || exists === 2) + if (this.sync) return cb.call(this, !!exists, isDir) + return process.nextTick(cb.bind(this, !!exists, isDir)) + } + + var stat = this.statCache[abs] + if (this.sync || stat) { + var er + try { + stat = fs.statSync(abs) + } catch (e) { + er = e + } + this._afterStat(f, abs, cb, er, stat) + } else { + fs.stat(abs, this._afterStat.bind(this, f, abs, cb)) + } +} + +Glob.prototype._afterStat = function (f, abs, cb, er, stat) { + var exists + assert(this instanceof Glob) + + if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) { + this.log("should be ENOTDIR, fake it") + + er = new Error("ENOTDIR, not a directory '" + abs + "'") + er.path = abs + er.code = "ENOTDIR" + stat = null + } + + var emit = !this.statCache[abs] + this.statCache[abs] = stat + + if (er || !stat) { + exists = false + } else { + exists = stat.isDirectory() ? 2 : 1 + if (emit) + this.emit('stat', f, stat) + } + this.cache[f] = this.cache[f] || exists + cb.call(this, !!exists, exists === 2) +} + +Glob.prototype._readdir = function (f, cb) { + assert(this instanceof Glob) + var abs = f + if (f.charAt(0) === "/") { + abs = path.join(this.root, f) + } else if (isAbsolute(f)) { + abs = f + } else if (this.changedCwd) { + abs = path.resolve(this.cwd, f) + } + + if (f.length > this.maxLength) { + var er = new Error("Path name too long") + er.code = "ENAMETOOLONG" + er.path = f + return this._afterReaddir(f, abs, cb, er) + } + + this.log('readdir', [this.cwd, f, abs]) + if (this.cache.hasOwnProperty(f)) { + var c = this.cache[f] + if (Array.isArray(c)) { + if (this.sync) return cb.call(this, null, c) + return process.nextTick(cb.bind(this, null, c)) + } + + if (!c || c === 1) { + // either ENOENT or ENOTDIR + var code = c ? "ENOTDIR" : "ENOENT" + , er = new Error((c ? "Not a directory" : "Not found") + ": " + f) + er.path = f + er.code = code + this.log(f, er) + if (this.sync) return cb.call(this, er) + return process.nextTick(cb.bind(this, er)) + } + + // at this point, c === 2, meaning it's a dir, but we haven't + // had to read it yet, or c === true, meaning it's *something* + // but we don't have any idea what. Need to read it, either way. + } + + if (this.sync) { + var er, entries + try { + entries = fs.readdirSync(abs) + } catch (e) { + er = e + } + return this._afterReaddir(f, abs, cb, er, entries) + } + + fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb)) +} + +Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) { + assert(this instanceof Glob) + if (entries && !er) { + this.cache[f] = entries + // if we haven't asked to stat everything for suresies, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. This also gets us one step + // further into ELOOP territory. + if (!this.mark && !this.stat) { + entries.forEach(function (e) { + if (f === "/") e = f + e + else e = f + "/" + e + this.cache[e] = true + }, this) + } + + return cb.call(this, er, entries) + } + + // now handle errors, and cache the information + if (er) switch (er.code) { + case "ENOTDIR": // totally normal. means it *does* exist. + this.cache[f] = 1 + return cb.call(this, er) + case "ENOENT": // not terribly unusual + case "ELOOP": + case "ENAMETOOLONG": + case "UNKNOWN": + this.cache[f] = false + return cb.call(this, er) + default: // some unusual error. Treat as failure. + this.cache[f] = false + if (this.strict) this.emit("error", er) + if (!this.silent) console.error("glob error", er) + return cb.call(this, er) + } +} + +var isAbsolute = process.platform === "win32" ? absWin : absUnix + +function absWin (p) { + if (absUnix(p)) return true + // pull off the device/UNC bit from a windows path. + // from node's lib/path.js + var splitDeviceRe = + /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/ + , result = splitDeviceRe.exec(p) + , device = result[1] || '' + , isUnc = device && device.charAt(1) !== ':' + , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute + + return isAbsolute +} + +function absUnix (p) { + return p.charAt(0) === "/" || p === "" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/.npmignore new file mode 100755 index 0000000..3c3629e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/LICENSE new file mode 100755 index 0000000..05a4010 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/README.md new file mode 100755 index 0000000..5b3967e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/README.md @@ -0,0 +1,218 @@ +# minimatch + +A minimal matching utility. + +[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) + + +This is the matching library used internally by npm. + +Eventually, it will replace the C binding in node-glob. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```javascript +var minimatch = require("minimatch") + +minimatch("bar.foo", "*.foo") // true! +minimatch("bar.foo", "*.bar") // false! +minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` + +## Minimatch Class + +Create a minimatch object by instanting the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require("minimatch").Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +* `pattern` The original pattern the minimatch object represents. +* `options` The options supplied to the constructor. +* `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +* `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +* `negate` True if the pattern is negated. +* `comment` True if the pattern is a comment. +* `empty` True if the pattern is `""`. + +### Methods + +* `makeRe` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +* `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +* `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. + +All other methods are internal, and will be called as necessary. + +## Functions + +The top-level exported function has a `cache` property, which is an LRU +cache set to store 100 items. So, calling these methods repeatedly +with the same pattern and options will use the same Minimatch object, +saving the cost of parsing it multiple times. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, "*.js", { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) +``` + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between minimatch and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +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.1, 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. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.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. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/minimatch.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/minimatch.js new file mode 100755 index 0000000..4539678 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/minimatch.js @@ -0,0 +1,1061 @@ +;(function (require, exports, module, platform) { + +if (module) module.exports = minimatch +else exports.minimatch = minimatch + +if (!require) { + require = function (id) { + switch (id) { + case "sigmund": return function sigmund (obj) { + return JSON.stringify(obj) + } + case "path": return { basename: function (f) { + f = f.split(/[\/\\]/) + var e = f.pop() + if (!e) e = f.pop() + return e + }} + case "lru-cache": return function LRUCache () { + // not quite an LRU, but still space-limited. + var cache = {} + var cnt = 0 + this.set = function (k, v) { + cnt ++ + if (cnt >= 100) cache = {} + cache[k] = v + } + this.get = function (k) { return cache[k] } + } + } + } +} + +minimatch.Minimatch = Minimatch + +var LRU = require("lru-cache") + , cache = minimatch.cache = new LRU({max: 100}) + , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} + , sigmund = require("sigmund") + +var path = require("path") + // any single thing other than / + // don't need to escape / when using new RegExp() + , qmark = "[^/]" + + // * => any number of characters + , star = qmark + "*?" + + // ** when dots are allowed. Anything goes, except .. and . + // not (^ or / followed by one or two dots followed by $ or /), + // followed by anything, any number of times. + , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?" + + // not a ^ or / followed by a dot, + // followed by anything, any number of times. + , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?" + + // characters that need to be escaped in RegExp. + , reSpecials = charSet("().*{}+?[]^$\\!") + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split("").reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + + +function minimatch (p, pattern, options) { + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required") + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === "#") { + return false + } + + // "" only matches "" + if (pattern.trim() === "") return p === "" + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options, cache) + } + + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required") + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows: need to use /, not \ + // On other platforms, \ is a valid (albeit bad) filename char. + if (platform === "win32") { + pattern = pattern.split("\\").join("/") + } + + // lru storage. + // these things aren't particularly big, but walking down the string + // and turning it into a regexp can get pretty costly. + var cacheKey = pattern + "\n" + sigmund(options) + var cached = minimatch.cache.get(cacheKey) + if (cached) return cached + minimatch.cache.set(cacheKey, this) + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function() {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return -1 === s.indexOf(false) + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + , negate = false + , options = this.options + , negateOffset = 0 + + if (options.nonegate) return + + for ( var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === "!" + ; i ++) { + negate = !negate + negateOffset ++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return new Minimatch(pattern, options).braceExpand() +} + +Minimatch.prototype.braceExpand = braceExpand +function braceExpand (pattern, options) { + options = options || this.options + pattern = typeof pattern === "undefined" + ? this.pattern : pattern + + if (typeof pattern === "undefined") { + throw new Error("undefined pattern") + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + var escaping = false + + // examples and comments refer to this crazy pattern: + // a{b,c{d,e},{f,g}h}x{y,z} + // expected: + // abxy + // abxz + // acdxy + // acdxz + // acexy + // acexz + // afhxy + // afhxz + // aghxy + // aghxz + + // everything before the first \{ is just a prefix. + // So, we pluck that off, and work with the rest, + // and then prepend it to everything we find. + if (pattern.charAt(0) !== "{") { + this.debug(pattern) + var prefix = null + for (var i = 0, l = pattern.length; i < l; i ++) { + var c = pattern.charAt(i) + this.debug(i, c) + if (c === "\\") { + escaping = !escaping + } else if (c === "{" && !escaping) { + prefix = pattern.substr(0, i) + break + } + } + + // actually no sets, all { were escaped. + if (prefix === null) { + this.debug("no sets") + return [pattern] + } + + var tail = braceExpand.call(this, pattern.substr(i), options) + return tail.map(function (t) { + return prefix + t + }) + } + + // now we have something like: + // {b,c{d,e},{f,g}h}x{y,z} + // walk through the set, expanding each part, until + // the set ends. then, we'll expand the suffix. + // If the set only has a single member, then'll put the {} back + + // first, handle numeric sets, since they're easier + var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) + if (numset) { + this.debug("numset", numset[1], numset[2]) + var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) + , start = +numset[1] + , end = +numset[2] + , inc = start > end ? -1 : 1 + , set = [] + for (var i = start; i != (end + inc); i += inc) { + // append all the suffixes + for (var ii = 0, ll = suf.length; ii < ll; ii ++) { + set.push(i + suf[ii]) + } + } + return set + } + + // ok, walk through the set + // We hope, somewhat optimistically, that there + // will be a } at the end. + // If the closing brace isn't found, then the pattern is + // interpreted as braceExpand("\\" + pattern) so that + // the leading \{ will be interpreted literally. + var i = 1 // skip the \{ + , depth = 1 + , set = [] + , member = "" + , sawEnd = false + , escaping = false + + function addMember () { + set.push(member) + member = "" + } + + this.debug("Entering for") + FOR: for (i = 1, l = pattern.length; i < l; i ++) { + var c = pattern.charAt(i) + this.debug("", i, c) + + if (escaping) { + escaping = false + member += "\\" + c + } else { + switch (c) { + case "\\": + escaping = true + continue + + case "{": + depth ++ + member += "{" + continue + + case "}": + depth -- + // if this closes the actual set, then we're done + if (depth === 0) { + addMember() + // pluck off the close-brace + i ++ + break FOR + } else { + member += c + continue + } + + case ",": + if (depth === 1) { + addMember() + } else { + member += c + } + continue + + default: + member += c + continue + } // switch + } // else + } // for + + // now we've either finished the set, and the suffix is + // pattern.substr(i), or we have *not* closed the set, + // and need to escape the leading brace + if (depth !== 0) { + this.debug("didn't close", pattern) + return braceExpand.call(this, "\\" + pattern, options) + } + + // x{y,z} -> ["xy", "xz"] + this.debug("set", set) + this.debug("suffix", pattern.substr(i)) + var suf = braceExpand.call(this, pattern.substr(i), options) + // ["b", "c{d,e}","{f,g}h"] -> + // [["b"], ["cd", "ce"], ["fh", "gh"]] + var addBraces = set.length === 1 + this.debug("set pre-expanded", set) + set = set.map(function (p) { + return braceExpand.call(this, p, options) + }, this) + this.debug("set expanded", set) + + + // [["b"], ["cd", "ce"], ["fh", "gh"]] -> + // ["b", "cd", "ce", "fh", "gh"] + set = set.reduce(function (l, r) { + return l.concat(r) + }) + + if (addBraces) { + set = set.map(function (s) { + return "{" + s + "}" + }) + } + + // now attach the suffixes. + var ret = [] + for (var i = 0, l = set.length; i < l; i ++) { + for (var ii = 0, ll = suf.length; ii < ll; ii ++) { + ret.push(set[i] + suf[ii]) + } + } + return ret +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === "**") return GLOBSTAR + if (pattern === "") return "" + + var re = "" + , hasMagic = !!options.nocase + , escaping = false + // ? => one single character + , patternListStack = [] + , plType + , stateChar + , inClass = false + , reClassStart = -1 + , classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + , patternStart = pattern.charAt(0) === "." ? "" // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" + : "(?!\\.)" + , self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case "*": + re += star + hasMagic = true + break + case "?": + re += qmark + hasMagic = true + break + default: + re += "\\"+stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for ( var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i ++ ) { + + this.debug("%s\t%s %s %j", pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += "\\" + c + escaping = false + continue + } + + SWITCH: switch (c) { + case "/": + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case "\\": + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === "!" && i === classStart + 1) c = "^" + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case "(": + if (inClass) { + re += "(" + continue + } + + if (!stateChar) { + re += "\\(" + continue + } + + plType = stateChar + patternListStack.push({ type: plType + , start: i - 1 + , reStart: re.length }) + // negation is (?:(?!js)[^/]*) + re += stateChar === "!" ? "(?:(?!" : "(?:" + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ")": + if (inClass || !patternListStack.length) { + re += "\\)" + continue + } + + clearStateChar() + hasMagic = true + re += ")" + plType = patternListStack.pop().type + // negation is (?:(?!js)[^/]*) + // The others are (?:) + switch (plType) { + case "!": + re += "[^/]*?)" + break + case "?": + case "+": + case "*": re += plType + case "@": break // the default anyway + } + continue + + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|" + escaping = false + continue + } + + clearStateChar() + re += "|" + continue + + // these are mostly the same in regexp and glob + case "[": + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += "\\" + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case "]": + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += "\\" + c + escaping = false + continue + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === "^" && inClass)) { + re += "\\" + } + + re += c + + } // switch + } // for + + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + var cs = pattern.substr(classStart + 1) + , sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + "\\[" + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + var pl + while (pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = "\\" + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + "|" + }) + + this.debug("tail=%j\n %s", tail, tail) + var t = pl.type === "*" ? star + : pl.type === "?" ? qmark + : "\\" + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + + t + "\\(" + + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += "\\\\" + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case ".": + case "[": + case "(": addPatternStart = true + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== "" && hasMagic) re = "(?=.)" + re + + if (addPatternStart) re = patternStart + re + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [ re, hasMagic ] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? "i" : "" + , regExp = new RegExp("^" + re + "$", flags) + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) return this.regexp = false + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + , flags = options.nocase ? "i" : "" + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === "string") ? regExpEscape(p) + : p._src + }).join("\\\/") + }).join("|") + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = "^(?:" + re + ")$" + + // can match anything, as long as it's not this. + if (this.negate) re = "^(?!" + re + ").*$" + + try { + return this.regexp = new RegExp(re, flags) + } catch (ex) { + return this.regexp = false + } +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug("match", f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === "" + + if (f === "/" && partial) return true + + var options = this.options + + // windows: need to use /, not \ + // On other platforms, \ is a valid (albeit bad) filename char. + if (platform === "win32") { + f = f.split("\\").join("/") + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, "split", f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, "set", set) + + // Find the basename of the path by looking for the last non-empty segment + var filename; + for (var i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (var i = 0, l = set.length; i < l; i ++) { + var pattern = set[i], file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug("matchOne", + { "this": this + , file: file + , pattern: pattern }) + + this.debug("matchOne", file.length, pattern.length) + + for ( var fi = 0 + , pi = 0 + , fl = file.length + , pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi ++, pi ++ ) { + + this.debug("matchOne loop") + var p = pattern[pi] + , f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + , pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for ( ; fi < fl; fi ++) { + if (file[fi] === "." || file[fi] === ".." || + (!options.dot && file[fi].charAt(0) === ".")) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + WHILE: while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', + file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === "." || swallowee === ".." || + (!options.dot && swallowee.charAt(0) === ".")) { + this.debug("dot detected!", file, fr, pattern, pr) + break WHILE + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr ++ + } + } + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug("\n>>> no match, partial?", file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === "string") { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug("string match", p, f, hit) + } else { + hit = f.match(p) + this.debug("pattern match", p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === "") + return emptyFileEnd + } + + // should be unreachable. + throw new Error("wtf?") +} + + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, "$1") +} + + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") +} + +})( typeof require === "function" ? require : null, + this, + typeof module === "object" ? module : null, + typeof process === "object" ? process.platform : "win32" + ) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore new file mode 100755 index 0000000..07e6e47 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore @@ -0,0 +1 @@ +/node_modules diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.travis.yml new file mode 100755 index 0000000..4af02b3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.travis.yml @@ -0,0 +1,8 @@ +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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS new file mode 100755 index 0000000..4a0bc50 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS @@ -0,0 +1,14 @@ +# Authors, sorted by whether or not they are me +Isaac Z. Schlueter +Brian Cottingham +Carlos Brito Lage +Jesse Dailey +Kevin O'Hara +Marco Rogers +Mark Cavage +Marko Mikulicic +Nathan Rajlich +Satheesh Natesan +Trent Mick +ashleybrener +n4kz diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE new file mode 100755 index 0000000..19129e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md new file mode 100755 index 0000000..3fd6d0b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md @@ -0,0 +1,119 @@ +# lru cache + +A cache object that deletes the least-recently-used items. + +## Usage: + +```javascript +var LRU = require("lru-cache") + , options = { max: 500 + , length: function (n) { return n * 2 } + , dispose: function (key, n) { n.close() } + , maxAge: 1000 * 60 * 60 } + , cache = LRU(options) + , otherCache = LRU(50) // sets just the max size + +cache.set("key", "value") +cache.get("key") // "value" + +cache.reset() // empty the cache +``` + +If you put more stuff in it, then items will fall out. + +If you try to put an oversized thing in it, then it'll fall out right +away. + +## Options + +* `max` The maximum size of the cache, checked by applying the length + function to all values in the cache. Not setting this is kind of + silly, since that's the whole purpose of this lib, but it defaults + to `Infinity`. +* `maxAge` Maximum age in ms. Items are not pro-actively pruned out + as they age, but if you try to get an item that is too old, it'll + drop it and return undefined instead of giving it to you. +* `length` Function that is used to calculate the length of stored + items. If you're storing strings or buffers, then you probably want + to do something like `function(n){return n.length}`. The default is + `function(n){return 1}`, which is fine if you want to store `max` + like-sized things. +* `dispose` Function that is called on items when they are dropped + from the cache. This can be handy if you want to close file + descriptors or do other cleanup tasks when items are no longer + accessible. Called with `key, value`. It's called *before* + actually removing the item from the internal cache, so if you want + to immediately put it back in, you'll have to do that in a + `nextTick` or `setTimeout` callback or it won't do anything. +* `stale` By default, if you set a `maxAge`, it'll only actually pull + stale items out of the cache when you `get(key)`. (That is, it's + not pre-emptively doing a `setTimeout` or anything.) If you set + `stale:true`, it'll return the stale value before deleting it. If + you don't set this, then it'll return `undefined` when you try to + get a stale entry, as if it had already been deleted. + +## API + +* `set(key, value, maxAge)` +* `get(key) => value` + + Both of these will update the "recently used"-ness of the key. + They do what you think. `max` is optional and overrides the + cache `max` option if provided. + +* `peek(key)` + + Returns the key value (or `undefined` if not found) without + updating the "recently used"-ness of the key. + + (If you find yourself using this a lot, you *might* be using the + wrong sort of data structure, but there are some use cases where + it's handy.) + +* `del(key)` + + Deletes a key out of the cache. + +* `reset()` + + Clear the cache entirely, throwing away all values. + +* `has(key)` + + Check if a key is in the cache, without updating the recent-ness + or deleting it for being stale. + +* `forEach(function(value,key,cache), [thisp])` + + Just like `Array.prototype.forEach`. Iterates over all the keys + in the cache, in order of recent-ness. (Ie, more recently used + items are iterated over first.) + +* `keys()` + + Return an array of the keys in the cache. + +* `values()` + + Return an array of the values in the cache. + +* `length()` + + Return total length of objects in cache taking into account + `length` options function. + +* `itemCount` + + Return total quantity of objects currently in cache. Note, that + `stale` (see options) items are returned as part of this item + count. + +* `dump()` + + Return an array of the cache entries ready for serialization and usage + with 'destinationCache.load(arr)`. + +* `load(cacheEntriesArray)` + + Loads another cache entries array, obtained with `sourceCache.dump()`, + into the cache. The destination cache is reset before loading new entries diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js new file mode 100755 index 0000000..32c2d2d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js @@ -0,0 +1,318 @@ +;(function () { // closure for web browsers + +if (typeof module === 'object' && module.exports) { + module.exports = LRUCache +} else { + // just set the global for non-node platforms. + this.LRUCache = LRUCache +} + +function hOP (obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key) +} + +function naiveLength () { return 1 } + +function LRUCache (options) { + if (!(this instanceof LRUCache)) + return new LRUCache(options) + + if (typeof options === 'number') + options = { max: options } + + if (!options) + options = {} + + this._max = options.max + // Kind of weird to have a default max of Infinity, but oh well. + if (!this._max || !(typeof this._max === "number") || this._max <= 0 ) + this._max = Infinity + + this._lengthCalculator = options.length || naiveLength + if (typeof this._lengthCalculator !== "function") + this._lengthCalculator = naiveLength + + this._allowStale = options.stale || false + this._maxAge = options.maxAge || null + this._dispose = options.dispose + this.reset() +} + +// resize the cache when the max changes. +Object.defineProperty(LRUCache.prototype, "max", + { set : function (mL) { + if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity + this._max = mL + if (this._length > this._max) trim(this) + } + , get : function () { return this._max } + , enumerable : true + }) + +// resize the cache when the lengthCalculator changes. +Object.defineProperty(LRUCache.prototype, "lengthCalculator", + { set : function (lC) { + if (typeof lC !== "function") { + this._lengthCalculator = naiveLength + this._length = this._itemCount + for (var key in this._cache) { + this._cache[key].length = 1 + } + } else { + this._lengthCalculator = lC + this._length = 0 + for (var key in this._cache) { + this._cache[key].length = this._lengthCalculator(this._cache[key].value) + this._length += this._cache[key].length + } + } + + if (this._length > this._max) trim(this) + } + , get : function () { return this._lengthCalculator } + , enumerable : true + }) + +Object.defineProperty(LRUCache.prototype, "length", + { get : function () { return this._length } + , enumerable : true + }) + + +Object.defineProperty(LRUCache.prototype, "itemCount", + { get : function () { return this._itemCount } + , enumerable : true + }) + +LRUCache.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + var i = 0 + var itemCount = this._itemCount + + for (var k = this._mru - 1; k >= 0 && i < itemCount; k--) if (this._lruList[k]) { + i++ + var hit = this._lruList[k] + if (isStale(this, hit)) { + del(this, hit) + if (!this._allowStale) hit = undefined + } + if (hit) { + fn.call(thisp, hit.value, hit.key, this) + } + } +} + +LRUCache.prototype.keys = function () { + var keys = new Array(this._itemCount) + var i = 0 + for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { + var hit = this._lruList[k] + keys[i++] = hit.key + } + return keys +} + +LRUCache.prototype.values = function () { + var values = new Array(this._itemCount) + var i = 0 + for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { + var hit = this._lruList[k] + values[i++] = hit.value + } + return values +} + +LRUCache.prototype.reset = function () { + if (this._dispose && this._cache) { + for (var k in this._cache) { + this._dispose(k, this._cache[k].value) + } + } + + this._cache = Object.create(null) // hash of items by key + this._lruList = Object.create(null) // list of items in order of use recency + this._mru = 0 // most recently used + this._lru = 0 // least recently used + this._length = 0 // number of items in the list + this._itemCount = 0 +} + +LRUCache.prototype.dump = function () { + var arr = [] + var i = 0 + + for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { + var hit = this._lruList[k] + if (!isStale(this, hit)) { + //Do not store staled hits + ++i + arr.push({ + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }); + } + } + //arr has the most read first + return arr +} + +LRUCache.prototype.dumpLru = function () { + return this._lruList +} + +LRUCache.prototype.set = function (key, value, maxAge) { + maxAge = maxAge || this._maxAge + var now = maxAge ? Date.now() : 0 + var len = this._lengthCalculator(value) + + if (hOP(this._cache, key)) { + if (len > this._max) { + del(this, this._cache[key]) + return false + } + // dispose of the old one before overwriting + if (this._dispose) + this._dispose(key, this._cache[key].value) + + this._cache[key].now = now + this._cache[key].maxAge = maxAge + this._cache[key].value = value + this._length += (len - this._cache[key].length) + this._cache[key].length = len + this.get(key) + + if (this._length > this._max) + trim(this) + + return true + } + + var hit = new Entry(key, value, this._mru++, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this._max) { + if (this._dispose) this._dispose(key, value) + return false + } + + this._length += hit.length + this._lruList[hit.lu] = this._cache[key] = hit + this._itemCount ++ + + if (this._length > this._max) + trim(this) + + return true +} + +LRUCache.prototype.has = function (key) { + if (!hOP(this._cache, key)) return false + var hit = this._cache[key] + if (isStale(this, hit)) { + return false + } + return true +} + +LRUCache.prototype.get = function (key) { + return get(this, key, true) +} + +LRUCache.prototype.peek = function (key) { + return get(this, key, false) +} + +LRUCache.prototype.pop = function () { + var hit = this._lruList[this._lru] + del(this, hit) + return hit || null +} + +LRUCache.prototype.del = function (key) { + del(this, this._cache[key]) +} + +LRUCache.prototype.load = function (arr) { + //reset the cache + this.reset(); + + var now = Date.now() + //A previous serialized cache has the most recent items first + for (var l = arr.length - 1; l >= 0; l-- ) { + var hit = arr[l] + var expiresAt = hit.e || 0 + if (expiresAt === 0) { + //the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + } else { + var maxAge = expiresAt - now + //dont add already expired items + if (maxAge > 0) this.set(hit.k, hit.v, maxAge) + } + } +} + +function get (self, key, doUse) { + var hit = self._cache[key] + if (hit) { + if (isStale(self, hit)) { + del(self, hit) + if (!self._allowStale) hit = undefined + } else { + if (doUse) use(self, hit) + } + if (hit) hit = hit.value + } + return hit +} + +function isStale(self, hit) { + if (!hit || (!hit.maxAge && !self._maxAge)) return false + var stale = false; + var diff = Date.now() - hit.now + if (hit.maxAge) { + stale = diff > hit.maxAge + } else { + stale = self._maxAge && (diff > self._maxAge) + } + return stale; +} + +function use (self, hit) { + shiftLU(self, hit) + hit.lu = self._mru ++ + self._lruList[hit.lu] = hit +} + +function trim (self) { + while (self._lru < self._mru && self._length > self._max) + del(self, self._lruList[self._lru]) +} + +function shiftLU (self, hit) { + delete self._lruList[ hit.lu ] + while (self._lru < self._mru && !self._lruList[self._lru]) self._lru ++ +} + +function del (self, hit) { + if (hit) { + if (self._dispose) self._dispose(hit.key, hit.value) + self._length -= hit.length + self._itemCount -- + delete self._cache[ hit.key ] + shiftLU(self, hit) + } +} + +// classy, since V8 prefers predictable objects. +function Entry (key, value, lu, length, now, maxAge) { + this.key = key + this.value = value + this.lu = lu + this.length = length + this.now = now + if (maxAge) this.maxAge = maxAge +} + +})() diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json new file mode 100755 index 0000000..c3addff --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json @@ -0,0 +1,58 @@ +{ + "name": "lru-cache", + "description": "A cache object that deletes the least-recently-used items.", + "version": "2.7.0", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "keywords": [ + "mru", + "lru", + "cache" + ], + "scripts": { + "test": "tap test --gc" + }, + "main": "lib/lru-cache.js", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-lru-cache.git" + }, + "devDependencies": { + "tap": "^1.2.0", + "weak": "" + }, + "license": "ISC", + "gitHead": "fc6ee93093f4e463e5946736d4c48adc013724d1", + "bugs": { + "url": "https://github.com/isaacs/node-lru-cache/issues" + }, + "homepage": "https://github.com/isaacs/node-lru-cache#readme", + "_id": "lru-cache@2.7.0", + "_shasum": "aaa376a4cd970f9cebf5ec1909566ec034f07ee6", + "_from": "lru-cache@2", + "_npmVersion": "3.3.2", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "aaa376a4cd970f9cebf5ec1909566ec034f07ee6", + "tarball": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.7.0.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js new file mode 100755 index 0000000..b47225f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js @@ -0,0 +1,396 @@ +var test = require("tap").test + , LRU = require("../") + +test("basic", function (t) { + var cache = new LRU({max: 10}) + cache.set("key", "value") + t.equal(cache.get("key"), "value") + t.equal(cache.get("nada"), undefined) + t.equal(cache.length, 1) + t.equal(cache.max, 10) + t.end() +}) + +test("least recently set", function (t) { + var cache = new LRU(2) + cache.set("a", "A") + cache.set("b", "B") + cache.set("c", "C") + t.equal(cache.get("c"), "C") + t.equal(cache.get("b"), "B") + t.equal(cache.get("a"), undefined) + t.end() +}) + +test("lru recently gotten", function (t) { + var cache = new LRU(2) + cache.set("a", "A") + cache.set("b", "B") + cache.get("a") + cache.set("c", "C") + t.equal(cache.get("c"), "C") + t.equal(cache.get("b"), undefined) + t.equal(cache.get("a"), "A") + t.end() +}) + +test("del", function (t) { + var cache = new LRU(2) + cache.set("a", "A") + cache.del("a") + t.equal(cache.get("a"), undefined) + t.end() +}) + +test("max", function (t) { + var cache = new LRU(3) + + // test changing the max, verify that the LRU items get dropped. + cache.max = 100 + for (var i = 0; i < 100; i ++) cache.set(i, i) + t.equal(cache.length, 100) + for (var i = 0; i < 100; i ++) { + t.equal(cache.get(i), i) + } + cache.max = 3 + t.equal(cache.length, 3) + for (var i = 0; i < 97; i ++) { + t.equal(cache.get(i), undefined) + } + for (var i = 98; i < 100; i ++) { + t.equal(cache.get(i), i) + } + + // now remove the max restriction, and try again. + cache.max = "hello" + for (var i = 0; i < 100; i ++) cache.set(i, i) + t.equal(cache.length, 100) + for (var i = 0; i < 100; i ++) { + t.equal(cache.get(i), i) + } + // should trigger an immediate resize + cache.max = 3 + t.equal(cache.length, 3) + for (var i = 0; i < 97; i ++) { + t.equal(cache.get(i), undefined) + } + for (var i = 98; i < 100; i ++) { + t.equal(cache.get(i), i) + } + t.end() +}) + +test("reset", function (t) { + var cache = new LRU(10) + cache.set("a", "A") + cache.set("b", "B") + cache.reset() + t.equal(cache.length, 0) + t.equal(cache.max, 10) + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), undefined) + t.end() +}) + + +test("basic with weighed length", function (t) { + var cache = new LRU({ + max: 100, + length: function (item) { return item.size } + }) + cache.set("key", {val: "value", size: 50}) + t.equal(cache.get("key").val, "value") + t.equal(cache.get("nada"), undefined) + t.equal(cache.lengthCalculator(cache.get("key")), 50) + t.equal(cache.length, 50) + t.equal(cache.max, 100) + t.end() +}) + + +test("weighed length item too large", function (t) { + var cache = new LRU({ + max: 10, + length: function (item) { return item.size } + }) + t.equal(cache.max, 10) + + // should fall out immediately + cache.set("key", {val: "value", size: 50}) + + t.equal(cache.length, 0) + t.equal(cache.get("key"), undefined) + t.end() +}) + +test("least recently set with weighed length", function (t) { + var cache = new LRU({ + max:8, + length: function (item) { return item.length } + }) + cache.set("a", "A") + cache.set("b", "BB") + cache.set("c", "CCC") + cache.set("d", "DDDD") + t.equal(cache.get("d"), "DDDD") + t.equal(cache.get("c"), "CCC") + t.equal(cache.get("b"), undefined) + t.equal(cache.get("a"), undefined) + t.end() +}) + +test("lru recently gotten with weighed length", function (t) { + var cache = new LRU({ + max: 8, + length: function (item) { return item.length } + }) + cache.set("a", "A") + cache.set("b", "BB") + cache.set("c", "CCC") + cache.get("a") + cache.get("b") + cache.set("d", "DDDD") + t.equal(cache.get("c"), undefined) + t.equal(cache.get("d"), "DDDD") + t.equal(cache.get("b"), "BB") + t.equal(cache.get("a"), "A") + t.end() +}) + +test("lru recently updated with weighed length", function (t) { + var cache = new LRU({ + max: 8, + length: function (item) { return item.length } + }) + cache.set("a", "A") + cache.set("b", "BB") + cache.set("c", "CCC") + t.equal(cache.length, 6) //CCC BB A + cache.set("a", "+A") + t.equal(cache.length, 7) //+A CCC BB + cache.set("b", "++BB") + t.equal(cache.length, 6) //++BB +A + t.equal(cache.get("c"), undefined) + + cache.set("c", "oversized") + t.equal(cache.length, 6) //++BB +A + t.equal(cache.get("c"), undefined) + + cache.set("a", "oversized") + t.equal(cache.length, 4) //++BB + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), "++BB") + t.end() +}) + +test("set returns proper booleans", function(t) { + var cache = new LRU({ + max: 5, + length: function (item) { return item.length } + }) + + t.equal(cache.set("a", "A"), true) + + // should return false for max exceeded + t.equal(cache.set("b", "donuts"), false) + + t.equal(cache.set("b", "B"), true) + t.equal(cache.set("c", "CCCC"), true) + t.end() +}) + +test("drop the old items", function(t) { + var cache = new LRU({ + max: 5, + maxAge: 50 + }) + + cache.set("a", "A") + + setTimeout(function () { + cache.set("b", "b") + t.equal(cache.get("a"), "A") + }, 25) + + setTimeout(function () { + cache.set("c", "C") + // timed out + t.notOk(cache.get("a")) + }, 60 + 25) + + setTimeout(function () { + t.notOk(cache.get("b")) + t.equal(cache.get("c"), "C") + }, 90) + + setTimeout(function () { + t.notOk(cache.get("c")) + t.end() + }, 155) +}) + +test("individual item can have it's own maxAge", function(t) { + var cache = new LRU({ + max: 5, + maxAge: 50 + }) + + cache.set("a", "A", 20) + setTimeout(function () { + t.notOk(cache.get("a")) + t.end() + }, 25) +}) + +test("individual item can have it's own maxAge > cache's", function(t) { + var cache = new LRU({ + max: 5, + maxAge: 20 + }) + + cache.set("a", "A", 50) + setTimeout(function () { + t.equal(cache.get("a"), "A") + t.end() + }, 25) +}) + +test("disposal function", function(t) { + var disposed = false + var cache = new LRU({ + max: 1, + dispose: function (k, n) { + disposed = n + } + }) + + cache.set(1, 1) + cache.set(2, 2) + t.equal(disposed, 1) + cache.set(3, 3) + t.equal(disposed, 2) + cache.reset() + t.equal(disposed, 3) + t.end() +}) + +test("disposal function on too big of item", function(t) { + var disposed = false + var cache = new LRU({ + max: 1, + length: function (k) { + return k.length + }, + dispose: function (k, n) { + disposed = n + } + }) + var obj = [ 1, 2 ] + + t.equal(disposed, false) + cache.set("obj", obj) + t.equal(disposed, obj) + t.end() +}) + +test("has()", function(t) { + var cache = new LRU({ + max: 1, + maxAge: 10 + }) + + cache.set('foo', 'bar') + t.equal(cache.has('foo'), true) + cache.set('blu', 'baz') + t.equal(cache.has('foo'), false) + t.equal(cache.has('blu'), true) + setTimeout(function() { + t.equal(cache.has('blu'), false) + t.end() + }, 15) +}) + +test("stale", function(t) { + var cache = new LRU({ + maxAge: 10, + stale: true + }) + + cache.set('foo', 'bar') + t.equal(cache.get('foo'), 'bar') + t.equal(cache.has('foo'), true) + setTimeout(function() { + t.equal(cache.has('foo'), false) + t.equal(cache.get('foo'), 'bar') + t.equal(cache.get('foo'), undefined) + t.end() + }, 15) +}) + +test("lru update via set", function(t) { + var cache = LRU({ max: 2 }); + + cache.set('foo', 1); + cache.set('bar', 2); + cache.del('bar'); + cache.set('baz', 3); + cache.set('qux', 4); + + t.equal(cache.get('foo'), undefined) + t.equal(cache.get('bar'), undefined) + t.equal(cache.get('baz'), 3) + t.equal(cache.get('qux'), 4) + t.end() +}) + +test("least recently set w/ peek", function (t) { + var cache = new LRU(2) + cache.set("a", "A") + cache.set("b", "B") + t.equal(cache.peek("a"), "A") + cache.set("c", "C") + t.equal(cache.get("c"), "C") + t.equal(cache.get("b"), "B") + t.equal(cache.get("a"), undefined) + t.end() +}) + +test("pop the least used item", function (t) { + var cache = new LRU(3) + , last + + cache.set("a", "A") + cache.set("b", "B") + cache.set("c", "C") + + t.equal(cache.length, 3) + t.equal(cache.max, 3) + + // Ensure we pop a, c, b + cache.get("b", "B") + + last = cache.pop() + t.equal(last.key, "a") + t.equal(last.value, "A") + t.equal(cache.length, 2) + t.equal(cache.max, 3) + + last = cache.pop() + t.equal(last.key, "c") + t.equal(last.value, "C") + t.equal(cache.length, 1) + t.equal(cache.max, 3) + + last = cache.pop() + t.equal(last.key, "b") + t.equal(last.value, "B") + t.equal(cache.length, 0) + t.equal(cache.max, 3) + + last = cache.pop() + t.equal(last, null) + t.equal(cache.length, 0) + t.equal(cache.max, 3) + + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js new file mode 100755 index 0000000..4190417 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js @@ -0,0 +1,120 @@ +var test = require('tap').test +var LRU = require('../') + +test('forEach', function (t) { + var l = new LRU(5) + for (var i = 0; i < 10; i ++) { + l.set(i.toString(), i.toString(2)) + } + + var i = 9 + l.forEach(function (val, key, cache) { + t.equal(cache, l) + t.equal(key, i.toString()) + t.equal(val, i.toString(2)) + i -= 1 + }) + + // get in order of most recently used + l.get(6) + l.get(8) + + var order = [ 8, 6, 9, 7, 5 ] + var i = 0 + + l.forEach(function (val, key, cache) { + var j = order[i ++] + t.equal(cache, l) + t.equal(key, j.toString()) + t.equal(val, j.toString(2)) + }) + t.equal(i, order.length); + + t.end() +}) + +test('keys() and values()', function (t) { + var l = new LRU(5) + for (var i = 0; i < 10; i ++) { + l.set(i.toString(), i.toString(2)) + } + + t.similar(l.keys(), ['9', '8', '7', '6', '5']) + t.similar(l.values(), ['1001', '1000', '111', '110', '101']) + + // get in order of most recently used + l.get(6) + l.get(8) + + t.similar(l.keys(), ['8', '6', '9', '7', '5']) + t.similar(l.values(), ['1000', '110', '1001', '111', '101']) + + t.end() +}) + +test('all entries are iterated over', function(t) { + var l = new LRU(5) + for (var i = 0; i < 10; i ++) { + l.set(i.toString(), i.toString(2)) + } + + var i = 0 + l.forEach(function (val, key, cache) { + if (i > 0) { + cache.del(key) + } + i += 1 + }) + + t.equal(i, 5) + t.equal(l.keys().length, 1) + + t.end() +}) + +test('all stale entries are removed', function(t) { + var l = new LRU({ max: 5, maxAge: -5, stale: true }) + for (var i = 0; i < 10; i ++) { + l.set(i.toString(), i.toString(2)) + } + + var i = 0 + l.forEach(function () { + i += 1 + }) + + t.equal(i, 5) + t.equal(l.keys().length, 0) + + t.end() +}) + +test('expires', function (t) { + var l = new LRU({ + max: 10, + maxAge: 50 + }) + for (var i = 0; i < 10; i++) { + l.set(i.toString(), i.toString(2), ((i % 2) ? 25 : undefined)) + } + + var i = 0 + var order = [ 8, 6, 4, 2, 0 ] + setTimeout(function () { + l.forEach(function (val, key, cache) { + var j = order[i++] + t.equal(cache, l) + t.equal(key, j.toString()) + t.equal(val, j.toString(2)) + }) + t.equal(i, order.length); + + setTimeout(function () { + var count = 0; + l.forEach(function (val, key, cache) { count++; }) + t.equal(0, count); + t.end() + }, 25) + + }, 26) +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js new file mode 100755 index 0000000..b5912f6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js @@ -0,0 +1,51 @@ +#!/usr/bin/env node --expose_gc + + +var weak = require('weak'); +var test = require('tap').test +var LRU = require('../') +var l = new LRU({ max: 10 }) +var refs = 0 +function X() { + refs ++ + weak(this, deref) +} + +function deref() { + refs -- +} + +test('no leaks', function (t) { + // fill up the cache + for (var i = 0; i < 100; i++) { + l.set(i, new X); + // throw some gets in there, too. + if (i % 2 === 0) + l.get(i / 2) + } + + gc() + + var start = process.memoryUsage() + + // capture the memory + var startRefs = refs + + // do it again, but more + for (var i = 0; i < 10000; i++) { + l.set(i, new X); + // throw some gets in there, too. + if (i % 2 === 0) + l.get(i / 2) + } + + gc() + + var end = process.memoryUsage() + t.equal(refs, startRefs, 'no leaky refs') + + console.error('start: %j\n' + + 'end: %j', start, end); + t.pass(); + t.end(); +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/serialize.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/serialize.js new file mode 100755 index 0000000..1094194 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/serialize.js @@ -0,0 +1,216 @@ +var test = require('tap').test +var LRU = require('../') + +test('dump', function (t) { + var cache = new LRU() + + t.equal(cache.dump().length, 0, "nothing in dump for empty cache") + + cache.set("a", "A") + cache.set("b", "B") + t.deepEqual(cache.dump(), [ + { k: "b", v: "B", e: 0 }, + { k: "a", v: "A", e: 0 } + ]) + + cache.set("a", "A"); + t.deepEqual(cache.dump(), [ + { k: "a", v: "A", e: 0 }, + { k: "b", v: "B", e: 0 } + ]) + + cache.get("b"); + t.deepEqual(cache.dump(), [ + { k: "b", v: "B", e: 0 }, + { k: "a", v: "A", e: 0 } + ]) + + cache.del("a"); + t.deepEqual(cache.dump(), [ + { k: "b", v: "B", e: 0 } + ]) + + t.end() +}) + +test("do not dump stale items", function(t) { + var cache = new LRU({ + max: 5, + maxAge: 50 + }) + + //expires at 50 + cache.set("a", "A") + + setTimeout(function () { + //expires at 75 + cache.set("b", "B") + var s = cache.dump() + t.equal(s.length, 2) + t.equal(s[0].k, "b") + t.equal(s[1].k, "a") + }, 25) + + setTimeout(function () { + //expires at 110 + cache.set("c", "C") + var s = cache.dump() + t.equal(s.length, 2) + t.equal(s[0].k, "c") + t.equal(s[1].k, "b") + }, 60) + + setTimeout(function () { + //expires at 130 + cache.set("d", "D", 40) + var s = cache.dump() + t.equal(s.length, 2) + t.equal(s[0].k, "d") + t.equal(s[1].k, "c") + }, 90) + + setTimeout(function () { + var s = cache.dump() + t.equal(s.length, 1) + t.equal(s[0].k, "d") + }, 120) + + setTimeout(function () { + var s = cache.dump() + t.deepEqual(s, []) + t.end() + }, 155) +}) + +test("load basic cache", function(t) { + var cache = new LRU(), + copy = new LRU() + + cache.set("a", "A") + cache.set("b", "B") + + copy.load(cache.dump()) + t.deepEquals(cache.dump(), copy.dump()) + + t.end() +}) + + +test("load staled cache", function(t) { + var cache = new LRU({maxAge: 50}), + copy = new LRU({maxAge: 50}), + arr + + //expires at 50 + cache.set("a", "A") + setTimeout(function () { + //expires at 80 + cache.set("b", "B") + arr = cache.dump() + t.equal(arr.length, 2) + }, 30) + + setTimeout(function () { + copy.load(arr) + t.equal(copy.get("a"), undefined) + t.equal(copy.get("b"), "B") + }, 60) + + setTimeout(function () { + t.equal(copy.get("b"), undefined) + t.end() + }, 90) +}) + +test("load to other size cache", function(t) { + var cache = new LRU({max: 2}), + copy = new LRU({max: 1}) + + cache.set("a", "A") + cache.set("b", "B") + + copy.load(cache.dump()) + t.equal(copy.get("a"), undefined) + t.equal(copy.get("b"), "B") + + //update the last read from original cache + cache.get("a") + copy.load(cache.dump()) + t.equal(copy.get("a"), "A") + t.equal(copy.get("b"), undefined) + + t.end() +}) + + +test("load to other age cache", function(t) { + var cache = new LRU({maxAge: 50}), + aged = new LRU({maxAge: 100}), + simple = new LRU(), + arr, + expired + + //created at 0 + //a would be valid till 0 + 50 + cache.set("a", "A") + setTimeout(function () { + //created at 20 + //b would be valid till 20 + 50 + cache.set("b", "B") + //b would be valid till 20 + 70 + cache.set("c", "C", 70) + arr = cache.dump() + t.equal(arr.length, 3) + }, 20) + + setTimeout(function () { + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), "B") + t.equal(cache.get("c"), "C") + + aged.load(arr) + t.equal(aged.get("a"), undefined) + t.equal(aged.get("b"), "B") + t.equal(aged.get("c"), "C") + + simple.load(arr) + t.equal(simple.get("a"), undefined) + t.equal(simple.get("b"), "B") + t.equal(simple.get("c"), "C") + }, 60) + + setTimeout(function () { + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), undefined) + t.equal(cache.get("c"), "C") + + aged.load(arr) + t.equal(aged.get("a"), undefined) + t.equal(aged.get("b"), undefined) + t.equal(aged.get("c"), "C") + + simple.load(arr) + t.equal(simple.get("a"), undefined) + t.equal(simple.get("b"), undefined) + t.equal(simple.get("c"), "C") + }, 80) + + setTimeout(function () { + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), undefined) + t.equal(cache.get("c"), undefined) + + aged.load(arr) + t.equal(aged.get("a"), undefined) + t.equal(aged.get("b"), undefined) + t.equal(aged.get("c"), undefined) + + simple.load(arr) + t.equal(simple.get("a"), undefined) + t.equal(simple.get("b"), undefined) + t.equal(simple.get("c"), undefined) + t.end() + }, 100) + +}) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE new file mode 100755 index 0000000..19129e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md new file mode 100755 index 0000000..25a38a5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md @@ -0,0 +1,53 @@ +# sigmund + +Quick and dirty signatures for Objects. + +This is like a much faster `deepEquals` comparison, which returns a +string key suitable for caches and the like. + +## Usage + +```javascript +function doSomething (someObj) { + var key = sigmund(someObj, maxDepth) // max depth defaults to 10 + var cached = cache.get(key) + if (cached) return cached + + var result = expensiveCalculation(someObj) + cache.set(key, result) + return result +} +``` + +The resulting key will be as unique and reproducible as calling +`JSON.stringify` or `util.inspect` on the object, but is much faster. +In order to achieve this speed, some differences are glossed over. +For example, the object `{0:'foo'}` will be treated identically to the +array `['foo']`. + +Also, just as there is no way to summon the soul from the scribblings +of a cocaine-addled psychoanalyst, there is no way to revive the object +from the signature string that sigmund gives you. In fact, it's +barely even readable. + +As with `util.inspect` and `JSON.stringify`, larger objects will +produce larger signature strings. + +Because sigmund is a bit less strict than the more thorough +alternatives, the strings will be shorter, and also there is a +slightly higher chance for collisions. For example, these objects +have the same signature: + + var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} + var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} + +Like a good Freudian, sigmund is most effective when you already have +some understanding of what you're looking for. It can help you help +yourself, but you must be willing to do some work as well. + +Cycles are handled, and cyclical objects are silently omitted (though +the key is included in the signature output.) + +The second argument is the maximum depth, which defaults to 10, +because that is the maximum object traversal depth covered by most +insurance carriers. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js new file mode 100755 index 0000000..5acfd6d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js @@ -0,0 +1,283 @@ +// different ways to id objects +// use a req/res pair, since it's crazy deep and cyclical + +// sparseFE10 and sigmund are usually pretty close, which is to be expected, +// since they are essentially the same algorithm, except that sigmund handles +// regular expression objects properly. + + +var http = require('http') +var util = require('util') +var sigmund = require('./sigmund.js') +var sreq, sres, creq, cres, test + +http.createServer(function (q, s) { + sreq = q + sres = s + sres.end('ok') + this.close(function () { setTimeout(function () { + start() + }, 200) }) +}).listen(1337, function () { + creq = http.get({ port: 1337 }) + creq.on('response', function (s) { cres = s }) +}) + +function start () { + test = [sreq, sres, creq, cres] + // test = sreq + // sreq.sres = sres + // sreq.creq = creq + // sreq.cres = cres + + for (var i in exports.compare) { + console.log(i) + var hash = exports.compare[i]() + console.log(hash) + console.log(hash.length) + console.log('') + } + + require('bench').runMain() +} + +function customWs (obj, md, d) { + d = d || 0 + var to = typeof obj + if (to === 'undefined' || to === 'function' || to === null) return '' + if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '') + + if (Array.isArray(obj)) { + return obj.map(function (i, _, __) { + return customWs(i, md, d + 1) + }).reduce(function (a, b) { return a + b }, '') + } + + var keys = Object.keys(obj) + return keys.map(function (k, _, __) { + return k + ':' + customWs(obj[k], md, d + 1) + }).reduce(function (a, b) { return a + b }, '') +} + +function custom (obj, md, d) { + d = d || 0 + var to = typeof obj + if (to === 'undefined' || to === 'function' || to === null) return '' + if (d > md || !obj || to !== 'object') return '' + obj + + if (Array.isArray(obj)) { + return obj.map(function (i, _, __) { + return custom(i, md, d + 1) + }).reduce(function (a, b) { return a + b }, '') + } + + var keys = Object.keys(obj) + return keys.map(function (k, _, __) { + return k + ':' + custom(obj[k], md, d + 1) + }).reduce(function (a, b) { return a + b }, '') +} + +function sparseFE2 (obj, maxDepth) { + var seen = [] + var soFar = '' + function ch (v, depth) { + if (depth > maxDepth) return + if (typeof v === 'function' || typeof v === 'undefined') return + if (typeof v !== 'object' || !v) { + soFar += v + return + } + if (seen.indexOf(v) !== -1 || depth === maxDepth) return + seen.push(v) + soFar += '{' + Object.keys(v).forEach(function (k, _, __) { + // pseudo-private values. skip those. + if (k.charAt(0) === '_') return + var to = typeof v[k] + if (to === 'function' || to === 'undefined') return + soFar += k + ':' + ch(v[k], depth + 1) + }) + soFar += '}' + } + ch(obj, 0) + return soFar +} + +function sparseFE (obj, maxDepth) { + var seen = [] + var soFar = '' + function ch (v, depth) { + if (depth > maxDepth) return + if (typeof v === 'function' || typeof v === 'undefined') return + if (typeof v !== 'object' || !v) { + soFar += v + return + } + if (seen.indexOf(v) !== -1 || depth === maxDepth) return + seen.push(v) + soFar += '{' + Object.keys(v).forEach(function (k, _, __) { + // pseudo-private values. skip those. + if (k.charAt(0) === '_') return + var to = typeof v[k] + if (to === 'function' || to === 'undefined') return + soFar += k + ch(v[k], depth + 1) + }) + } + ch(obj, 0) + return soFar +} + +function sparse (obj, maxDepth) { + var seen = [] + var soFar = '' + function ch (v, depth) { + if (depth > maxDepth) return + if (typeof v === 'function' || typeof v === 'undefined') return + if (typeof v !== 'object' || !v) { + soFar += v + return + } + if (seen.indexOf(v) !== -1 || depth === maxDepth) return + seen.push(v) + soFar += '{' + for (var k in v) { + // pseudo-private values. skip those. + if (k.charAt(0) === '_') continue + var to = typeof v[k] + if (to === 'function' || to === 'undefined') continue + soFar += k + ch(v[k], depth + 1) + } + } + ch(obj, 0) + return soFar +} + +function noCommas (obj, maxDepth) { + var seen = [] + var soFar = '' + function ch (v, depth) { + if (depth > maxDepth) return + if (typeof v === 'function' || typeof v === 'undefined') return + if (typeof v !== 'object' || !v) { + soFar += v + return + } + if (seen.indexOf(v) !== -1 || depth === maxDepth) return + seen.push(v) + soFar += '{' + for (var k in v) { + // pseudo-private values. skip those. + if (k.charAt(0) === '_') continue + var to = typeof v[k] + if (to === 'function' || to === 'undefined') continue + soFar += k + ':' + ch(v[k], depth + 1) + } + soFar += '}' + } + ch(obj, 0) + return soFar +} + + +function flatten (obj, maxDepth) { + var seen = [] + var soFar = '' + function ch (v, depth) { + if (depth > maxDepth) return + if (typeof v === 'function' || typeof v === 'undefined') return + if (typeof v !== 'object' || !v) { + soFar += v + return + } + if (seen.indexOf(v) !== -1 || depth === maxDepth) return + seen.push(v) + soFar += '{' + for (var k in v) { + // pseudo-private values. skip those. + if (k.charAt(0) === '_') continue + var to = typeof v[k] + if (to === 'function' || to === 'undefined') continue + soFar += k + ':' + ch(v[k], depth + 1) + soFar += ',' + } + soFar += '}' + } + ch(obj, 0) + return soFar +} + +exports.compare = +{ + // 'custom 2': function () { + // return custom(test, 2, 0) + // }, + // 'customWs 2': function () { + // return customWs(test, 2, 0) + // }, + 'JSON.stringify (guarded)': function () { + var seen = [] + return JSON.stringify(test, function (k, v) { + if (typeof v !== 'object' || !v) return v + if (seen.indexOf(v) !== -1) return undefined + seen.push(v) + return v + }) + }, + + 'flatten 10': function () { + return flatten(test, 10) + }, + + // 'flattenFE 10': function () { + // return flattenFE(test, 10) + // }, + + 'noCommas 10': function () { + return noCommas(test, 10) + }, + + 'sparse 10': function () { + return sparse(test, 10) + }, + + 'sparseFE 10': function () { + return sparseFE(test, 10) + }, + + 'sparseFE2 10': function () { + return sparseFE2(test, 10) + }, + + sigmund: function() { + return sigmund(test, 10) + }, + + + // 'util.inspect 1': function () { + // return util.inspect(test, false, 1, false) + // }, + // 'util.inspect undefined': function () { + // util.inspect(test) + // }, + // 'util.inspect 2': function () { + // util.inspect(test, false, 2, false) + // }, + // 'util.inspect 3': function () { + // util.inspect(test, false, 3, false) + // }, + // 'util.inspect 4': function () { + // util.inspect(test, false, 4, false) + // }, + // 'util.inspect Infinity': function () { + // util.inspect(test, false, Infinity, false) + // } +} + +/** results +**/ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json new file mode 100755 index 0000000..a0a65d5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json @@ -0,0 +1,60 @@ +{ + "name": "sigmund", + "version": "1.0.1", + "description": "Quick and dirty signatures for Objects.", + "main": "sigmund.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "~0.3.0" + }, + "scripts": { + "test": "tap test/*.js", + "bench": "node bench.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/sigmund.git" + }, + "keywords": [ + "object", + "signature", + "key", + "data", + "psychoanalysis" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "gitHead": "527f97aa5bb253d927348698c0cd3bb267d098c6", + "bugs": { + "url": "https://github.com/isaacs/sigmund/issues" + }, + "homepage": "https://github.com/isaacs/sigmund#readme", + "_id": "sigmund@1.0.1", + "_shasum": "3ff21f198cad2175f9f3b781853fd94d0d19b590", + "_from": "sigmund@~1.0.0", + "_npmVersion": "2.10.0", + "_nodeVersion": "2.0.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "3ff21f198cad2175f9f3b781853fd94d0d19b590", + "tarball": "http://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "_resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js new file mode 100755 index 0000000..82c7ab8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js @@ -0,0 +1,39 @@ +module.exports = sigmund +function sigmund (subject, maxSessions) { + maxSessions = maxSessions || 10; + var notes = []; + var analysis = ''; + var RE = RegExp; + + function psychoAnalyze (subject, session) { + if (session > maxSessions) return; + + if (typeof subject === 'function' || + typeof subject === 'undefined') { + return; + } + + if (typeof subject !== 'object' || !subject || + (subject instanceof RE)) { + analysis += subject; + return; + } + + if (notes.indexOf(subject) !== -1 || session === maxSessions) return; + + notes.push(subject); + analysis += '{'; + Object.keys(subject).forEach(function (issue, _, __) { + // pseudo-private values. skip those. + if (issue.charAt(0) === '_') return; + var to = typeof subject[issue]; + if (to === 'function' || to === 'undefined') return; + analysis += issue; + psychoAnalyze(subject[issue], session + 1); + }); + } + psychoAnalyze(subject, 0); + return analysis; +} + +// vim: set softtabstop=4 shiftwidth=4: diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js new file mode 100755 index 0000000..50c53a1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js @@ -0,0 +1,24 @@ +var test = require('tap').test +var sigmund = require('../sigmund.js') + + +// occasionally there are duplicates +// that's an acceptable edge-case. JSON.stringify and util.inspect +// have some collision potential as well, though less, and collision +// detection is expensive. +var hash = '{abc/def/g{0h1i2{jkl' +var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} +var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} + +var obj3 = JSON.parse(JSON.stringify(obj1)) +obj3.c = /def/ +obj3.g[2].cycle = obj3 +var cycleHash = '{abc/def/g{0h1i2{jklcycle' + +test('basic', function (t) { + t.equal(sigmund(obj1), hash) + t.equal(sigmund(obj2), hash) + t.equal(sigmund(obj3), cycleHash) + t.end() +}) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/package.json new file mode 100755 index 0000000..0fe147d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/package.json @@ -0,0 +1,57 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "0.3.0", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "test": "tap test/*.js" + }, + "engines": { + "node": "*" + }, + "dependencies": { + "lru-cache": "2", + "sigmund": "~1.0.0" + }, + "devDependencies": { + "tap": "" + }, + "license": { + "type": "MIT", + "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" + }, + "bugs": { + "url": "https://github.com/isaacs/minimatch/issues" + }, + "homepage": "https://github.com/isaacs/minimatch", + "_id": "minimatch@0.3.0", + "_shasum": "275d8edaac4f1bb3326472089e7949c8394699dd", + "_from": "minimatch@0.3", + "_npmVersion": "1.4.10", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "275d8edaac4f1bb3326472089e7949c8394699dd", + "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/basic.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/basic.js new file mode 100755 index 0000000..ae7ac73 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/basic.js @@ -0,0 +1,399 @@ +// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test +// +// TODO: Some of these tests do very bad things with backslashes, and will +// most likely fail badly on windows. They should probably be skipped. + +var tap = require("tap") + , globalBefore = Object.keys(global) + , mm = require("../") + , files = [ "a", "b", "c", "d", "abc" + , "abd", "abe", "bb", "bcd" + , "ca", "cb", "dd", "de" + , "bdir/", "bdir/cfile"] + , next = files.concat([ "a-b", "aXb" + , ".x", ".y" ]) + + +var patterns = + [ "http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test" + , ["a*", ["a", "abc", "abd", "abe"]] + , ["X*", ["X*"], {nonull: true}] + + // allow null glob expansion + , ["X*", []] + + // isaacs: Slightly different than bash/sh/ksh + // \\* is not un-escaped to literal "*" in a failed match, + // but it does make it get treated as a literal star + , ["\\*", ["\\*"], {nonull: true}] + , ["\\**", ["\\**"], {nonull: true}] + , ["\\*\\*", ["\\*\\*"], {nonull: true}] + + , ["b*/", ["bdir/"]] + , ["c*", ["c", "ca", "cb"]] + , ["**", files] + + , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] + , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] + + , "legendary larry crashes bashes" + , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" + , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] + , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" + , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] + + , "character classes" + , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] + , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", + "bdir/", "ca", "cb", "dd", "de"]] + , ["a*[^c]", ["abd", "abe"]] + , function () { files.push("a-b", "aXb") } + , ["a[X-]b", ["a-b", "aXb"]] + , function () { files.push(".x", ".y") } + , ["[^a-c]*", ["d", "dd", "de"]] + , function () { files.push("a*b/", "a*b/ooo") } + , ["a\\*b/*", ["a*b/ooo"]] + , ["a\\*?/*", ["a*b/ooo"]] + , ["*\\\\!*", [], {null: true}, ["echo !7"]] + , ["*\\!*", ["echo !7"], null, ["echo !7"]] + , ["*.\\*", ["r.*"], null, ["r.*"]] + , ["a[b]c", ["abc"]] + , ["a[\\b]c", ["abc"]] + , ["a?c", ["abc"]] + , ["a\\*c", [], {null: true}, ["abc"]] + , ["", [""], { null: true }, [""]] + + , "http://www.opensource.apple.com/source/bash/bash-23/" + + "bash/tests/glob-test" + , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } + , ["*/man*/bash.*", ["man/man1/bash.1"]] + , ["man/man1/bash.1", ["man/man1/bash.1"]] + , ["a***c", ["abc"], null, ["abc"]] + , ["a*****?c", ["abc"], null, ["abc"]] + , ["?*****??", ["abc"], null, ["abc"]] + , ["*****??", ["abc"], null, ["abc"]] + , ["?*****?c", ["abc"], null, ["abc"]] + , ["?***?****c", ["abc"], null, ["abc"]] + , ["?***?****?", ["abc"], null, ["abc"]] + , ["?***?****", ["abc"], null, ["abc"]] + , ["*******c", ["abc"], null, ["abc"]] + , ["*******?", ["abc"], null, ["abc"]] + , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] + , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] + , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] + , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] + , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] + , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] + , ["[-abc]", ["-"], null, ["-"]] + , ["[abc-]", ["-"], null, ["-"]] + , ["\\", ["\\"], null, ["\\"]] + , ["[\\\\]", ["\\"], null, ["\\"]] + , ["[[]", ["["], null, ["["]] + , ["[", ["["], null, ["["]] + , ["[*", ["[abc"], null, ["[abc"]] + , "a right bracket shall lose its special meaning and\n" + + "represent itself in a bracket expression if it occurs\n" + + "first in the list. -- POSIX.2 2.8.3.2" + , ["[]]", ["]"], null, ["]"]] + , ["[]-]", ["]"], null, ["]"]] + , ["[a-\z]", ["p"], null, ["p"]] + , ["??**********?****?", [], { null: true }, ["abc"]] + , ["??**********?****c", [], { null: true }, ["abc"]] + , ["?************c****?****", [], { null: true }, ["abc"]] + , ["*c*?**", [], { null: true }, ["abc"]] + , ["a*****c*?**", [], { null: true }, ["abc"]] + , ["a********???*******", [], { null: true }, ["abc"]] + , ["[]", [], { null: true }, ["a"]] + , ["[abc", [], { null: true }, ["["]] + + , "nocase tests" + , ["XYZ", ["xYz"], { nocase: true, null: true } + , ["xYz", "ABC", "IjK"]] + , ["ab*", ["ABC"], { nocase: true, null: true } + , ["xYz", "ABC", "IjK"]] + , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } + , ["xYz", "ABC", "IjK"]] + + // [ pattern, [matches], MM opts, files, TAP opts] + , "onestar/twostar" + , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] + , ["{/?,*}", ["/a", "bb"], {null: true} + , ["/a", "/b/b", "/a/b/c", "bb"]] + + , "dots should not match unless requested" + , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] + + // .. and . can only match patterns starting with ., + // even when options.dot is set. + , function () { + files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] + } + , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] + , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] + , ["a/*/b", ["a/c/b"], {dot:false}] + , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] + + + // this also tests that changing the options needs + // to change the cache key, even if the pattern is + // the same! + , ["**", ["a/b","a/.d",".a/.d"], { dot: true } + , [ ".a/.d", "a/.d", "a/b"]] + + , "paren sets cannot contain slashes" + , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] + + // brace sets trump all else. + // + // invalid glob pattern. fails on bash4 and bsdglob. + // however, in this implementation, it's easier just + // to do the intuitive thing, and let brace-expansion + // actually come before parsing any extglob patterns, + // like the documentation seems to say. + // + // XXX: if anyone complains about this, either fix it + // or tell them to grow up and stop complaining. + // + // bash/bsdglob says this: + // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] + // but we do this instead: + , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] + + // test partial parsing in the presence of comment/negation chars + , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] + , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] + + // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. + , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" + , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] + , {} + , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] + + + // crazy nested {,,} and *(||) tests. + , function () { + files = [ "a", "b", "c", "d" + , "ab", "ac", "ad" + , "bc", "cb" + , "bc,d", "c,db", "c,d" + , "d)", "(b|c", "*(b|c" + , "b|c", "b|cc", "cb|c" + , "x(a|b|c)", "x(a|c)" + , "(a|b|c)", "(a|c)"] + } + , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] + , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] + // a + // *(b|c) + // *(b|d) + , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] + , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] + + + // test various flag settings. + , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] + , { noext: true } ] + , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} + , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] + , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] + + + // begin channelling Boole and deMorgan... + , "negation tests" + , function () { + files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] + } + + // anything that is NOT a* matches. + , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] + + // anything that IS !a* matches. + , ["!a*", ["!ab", "!abc"], {nonegate: true}] + + // anything that IS a* matches + , ["!!a*", ["a!b"]] + + // anything that is NOT !a* matches + , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] + + // negation nestled within a pattern + , function () { + files = [ "foo.js" + , "foo.bar" + // can't match this one without negative lookbehind. + , "foo.js.js" + , "blar.js" + , "foo." + , "boo.js.boo" ] + } + , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] + + // https://github.com/isaacs/minimatch/issues/5 + , function () { + files = [ 'a/b/.x/c' + , 'a/b/.x/c/d' + , 'a/b/.x/c/d/e' + , 'a/b/.x' + , 'a/b/.x/' + , 'a/.x/b' + , '.x' + , '.x/' + , '.x/a' + , '.x/a/b' + , 'a/.x/b/.x/c' + , '.x/.x' ] + } + , ["**/.x/**", [ '.x/' + , '.x/a' + , '.x/a/b' + , 'a/.x/b' + , 'a/b/.x/' + , 'a/b/.x/c' + , 'a/b/.x/c/d' + , 'a/b/.x/c/d/e' ] ] + + ] + +var regexps = + [ '/^(?:(?=.)a[^/]*?)$/', + '/^(?:(?=.)X[^/]*?)$/', + '/^(?:(?=.)X[^/]*?)$/', + '/^(?:\\*)$/', + '/^(?:(?=.)\\*[^/]*?)$/', + '/^(?:\\*\\*)$/', + '/^(?:(?=.)b[^/]*?\\/)$/', + '/^(?:(?=.)c[^/]*?)$/', + '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', + '/^(?:\\.\\.\\/(?!\\.)(?=.)[^/]*?\\/)$/', + '/^(?:s\\/(?=.)\\.\\.[^/]*?\\/)$/', + '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/1\\/)$/', + '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/\u0001\\/)$/', + '/^(?:(?!\\.)(?=.)[a-c]b[^/]*?)$/', + '/^(?:(?!\\.)(?=.)[a-y][^/]*?[^c])$/', + '/^(?:(?=.)a[^/]*?[^c])$/', + '/^(?:(?=.)a[X-]b)$/', + '/^(?:(?!\\.)(?=.)[^a-c][^/]*?)$/', + '/^(?:a\\*b\\/(?!\\.)(?=.)[^/]*?)$/', + '/^(?:(?=.)a\\*[^/]\\/(?!\\.)(?=.)[^/]*?)$/', + '/^(?:(?!\\.)(?=.)[^/]*?\\\\\\![^/]*?)$/', + '/^(?:(?!\\.)(?=.)[^/]*?\\![^/]*?)$/', + '/^(?:(?!\\.)(?=.)[^/]*?\\.\\*)$/', + '/^(?:(?=.)a[b]c)$/', + '/^(?:(?=.)a[b]c)$/', + '/^(?:(?=.)a[^/]c)$/', + '/^(?:a\\*c)$/', + 'false', + '/^(?:(?!\\.)(?=.)[^/]*?\\/(?=.)man[^/]*?\\/(?=.)bash\\.[^/]*?)$/', + '/^(?:man\\/man1\\/bash\\.1)$/', + '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?c)$/', + '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', + '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', + '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', + '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', + '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', + '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', + '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/', + '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c)$/', + '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', + '/^(?:(?=.)a[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/', + '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/', + '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k[^/]*?[^/]*?[^/]*?)$/', + '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k)$/', + '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k[^/]*?[^/]*?)$/', + '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/', + '/^(?:(?!\\.)(?=.)[-abc])$/', + '/^(?:(?!\\.)(?=.)[abc-])$/', + '/^(?:\\\\)$/', + '/^(?:(?!\\.)(?=.)[\\\\])$/', + '/^(?:(?!\\.)(?=.)[\\[])$/', + '/^(?:\\[)$/', + '/^(?:(?=.)\\[(?!\\.)(?=.)[^/]*?)$/', + '/^(?:(?!\\.)(?=.)[\\]])$/', + '/^(?:(?!\\.)(?=.)[\\]-])$/', + '/^(?:(?!\\.)(?=.)[a-z])$/', + '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', + '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', + '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/', + '/^(?:(?!\\.)(?=.)[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/', + '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/', + '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/', + '/^(?:\\[\\])$/', + '/^(?:\\[abc)$/', + '/^(?:(?=.)XYZ)$/i', + '/^(?:(?=.)ab[^/]*?)$/i', + '/^(?:(?!\\.)(?=.)[ia][^/][ck])$/i', + '/^(?:\\/(?!\\.)(?=.)[^/]*?|(?!\\.)(?=.)[^/]*?)$/', + '/^(?:\\/(?!\\.)(?=.)[^/]|(?!\\.)(?=.)[^/]*?)$/', + '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', + '/^(?:a\\/(?!(?:^|\\/)\\.{1,2}(?:$|\\/))(?=.)[^/]*?\\/b)$/', + '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/', + '/^(?:a\\/(?!\\.)(?=.)[^/]*?\\/b)$/', + '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/', + '/^(?:(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?)$/', + '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\/b\\))$/', + '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', + '/^(?:(?=.)\\[(?=.)\\!a[^/]*?)$/', + '/^(?:(?=.)\\[(?=.)#a[^/]*?)$/', + '/^(?:(?=.)\\+\\(a\\|[^/]*?\\|c\\\\\\\\\\|d\\\\\\\\\\|e\\\\\\\\\\\\\\\\\\|f\\\\\\\\\\\\\\\\\\|g)$/', + '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', + '/^(?:a|(?!\\.)(?=.)[^/]*?\\(b\\|c|d\\))$/', + '/^(?:a|(?!\\.)(?=.)(?:b|c)*|(?!\\.)(?=.)(?:b|d)*)$/', + '/^(?:(?!\\.)(?=.)(?:a|b|c)*|(?!\\.)(?=.)(?:a|c)*)$/', + '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\|b\\|c\\)|(?!\\.)(?=.)[^/]*?\\(a\\|c\\))$/', + '/^(?:(?=.)a[^/]b)$/', + '/^(?:(?=.)#[^/]*?)$/', + '/^(?!^(?:(?=.)a[^/]*?)$).*$/', + '/^(?:(?=.)\\!a[^/]*?)$/', + '/^(?:(?=.)a[^/]*?)$/', + '/^(?!^(?:(?=.)\\!a[^/]*?)$).*$/', + '/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/', + '/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ] +var re = 0; + +tap.test("basic tests", function (t) { + var start = Date.now() + + // [ pattern, [matches], MM opts, files, TAP opts] + patterns.forEach(function (c) { + if (typeof c === "function") return c() + if (typeof c === "string") return t.comment(c) + + var pattern = c[0] + , expect = c[1].sort(alpha) + , options = c[2] || {} + , f = c[3] || files + , tapOpts = c[4] || {} + + // options.debug = true + var m = new mm.Minimatch(pattern, options) + var r = m.makeRe() + var expectRe = regexps[re++] + tapOpts.re = String(r) || JSON.stringify(r) + tapOpts.files = JSON.stringify(f) + tapOpts.pattern = pattern + tapOpts.set = m.set + tapOpts.negated = m.negate + + var actual = mm.match(f, pattern, options) + actual.sort(alpha) + + t.equivalent( actual, expect + , JSON.stringify(pattern) + " " + JSON.stringify(expect) + , tapOpts ) + + t.equal(tapOpts.re, expectRe, tapOpts) + }) + + t.comment("time=" + (Date.now() - start) + "ms") + t.end() +}) + +tap.test("global leak test", function (t) { + var globalAfter = Object.keys(global) + t.equivalent(globalAfter, globalBefore, "no new globals, please") + t.end() +}) + +function alpha (a, b) { + return a > b ? 1 : -1 +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/brace-expand.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/brace-expand.js new file mode 100755 index 0000000..7ee278a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/brace-expand.js @@ -0,0 +1,33 @@ +var tap = require("tap") + , minimatch = require("../") + +tap.test("brace expansion", function (t) { + // [ pattern, [expanded] ] + ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}" + , [ "abxy" + , "abxz" + , "acdxy" + , "acdxz" + , "acexy" + , "acexz" + , "afhxy" + , "afhxz" + , "aghxy" + , "aghxz" ] ] + , [ "a{1..5}b" + , [ "a1b" + , "a2b" + , "a3b" + , "a4b" + , "a5b" ] ] + , [ "a{b}c", ["a{b}c"] ] + ].forEach(function (tc) { + var p = tc[0] + , expect = tc[1] + t.equivalent(minimatch.braceExpand(p), expect, p) + }) + console.error("ending") + t.end() +}) + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/caching.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/caching.js new file mode 100755 index 0000000..0fec4b0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/caching.js @@ -0,0 +1,14 @@ +var Minimatch = require("../minimatch.js").Minimatch +var tap = require("tap") +tap.test("cache test", function (t) { + var mm1 = new Minimatch("a?b") + var mm2 = new Minimatch("a?b") + t.equal(mm1, mm2, "should get the same object") + // the lru should drop it after 100 entries + for (var i = 0; i < 100; i ++) { + new Minimatch("a"+i) + } + mm2 = new Minimatch("a?b") + t.notEqual(mm1, mm2, "cache should have dropped") + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/defaults.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/defaults.js new file mode 100755 index 0000000..75e0571 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/defaults.js @@ -0,0 +1,274 @@ +// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test +// +// TODO: Some of these tests do very bad things with backslashes, and will +// most likely fail badly on windows. They should probably be skipped. + +var tap = require("tap") + , globalBefore = Object.keys(global) + , mm = require("../") + , files = [ "a", "b", "c", "d", "abc" + , "abd", "abe", "bb", "bcd" + , "ca", "cb", "dd", "de" + , "bdir/", "bdir/cfile"] + , next = files.concat([ "a-b", "aXb" + , ".x", ".y" ]) + +tap.test("basic tests", function (t) { + var start = Date.now() + + // [ pattern, [matches], MM opts, files, TAP opts] + ; [ "http://www.bashcookbook.com/bashinfo" + + "/source/bash-1.14.7/tests/glob-test" + , ["a*", ["a", "abc", "abd", "abe"]] + , ["X*", ["X*"], {nonull: true}] + + // allow null glob expansion + , ["X*", []] + + // isaacs: Slightly different than bash/sh/ksh + // \\* is not un-escaped to literal "*" in a failed match, + // but it does make it get treated as a literal star + , ["\\*", ["\\*"], {nonull: true}] + , ["\\**", ["\\**"], {nonull: true}] + , ["\\*\\*", ["\\*\\*"], {nonull: true}] + + , ["b*/", ["bdir/"]] + , ["c*", ["c", "ca", "cb"]] + , ["**", files] + + , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] + , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] + + , "legendary larry crashes bashes" + , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" + , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] + , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" + , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] + + , "character classes" + , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] + , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", + "bdir/", "ca", "cb", "dd", "de"]] + , ["a*[^c]", ["abd", "abe"]] + , function () { files.push("a-b", "aXb") } + , ["a[X-]b", ["a-b", "aXb"]] + , function () { files.push(".x", ".y") } + , ["[^a-c]*", ["d", "dd", "de"]] + , function () { files.push("a*b/", "a*b/ooo") } + , ["a\\*b/*", ["a*b/ooo"]] + , ["a\\*?/*", ["a*b/ooo"]] + , ["*\\\\!*", [], {null: true}, ["echo !7"]] + , ["*\\!*", ["echo !7"], null, ["echo !7"]] + , ["*.\\*", ["r.*"], null, ["r.*"]] + , ["a[b]c", ["abc"]] + , ["a[\\b]c", ["abc"]] + , ["a?c", ["abc"]] + , ["a\\*c", [], {null: true}, ["abc"]] + , ["", [""], { null: true }, [""]] + + , "http://www.opensource.apple.com/source/bash/bash-23/" + + "bash/tests/glob-test" + , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } + , ["*/man*/bash.*", ["man/man1/bash.1"]] + , ["man/man1/bash.1", ["man/man1/bash.1"]] + , ["a***c", ["abc"], null, ["abc"]] + , ["a*****?c", ["abc"], null, ["abc"]] + , ["?*****??", ["abc"], null, ["abc"]] + , ["*****??", ["abc"], null, ["abc"]] + , ["?*****?c", ["abc"], null, ["abc"]] + , ["?***?****c", ["abc"], null, ["abc"]] + , ["?***?****?", ["abc"], null, ["abc"]] + , ["?***?****", ["abc"], null, ["abc"]] + , ["*******c", ["abc"], null, ["abc"]] + , ["*******?", ["abc"], null, ["abc"]] + , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] + , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] + , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] + , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] + , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] + , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] + , ["[-abc]", ["-"], null, ["-"]] + , ["[abc-]", ["-"], null, ["-"]] + , ["\\", ["\\"], null, ["\\"]] + , ["[\\\\]", ["\\"], null, ["\\"]] + , ["[[]", ["["], null, ["["]] + , ["[", ["["], null, ["["]] + , ["[*", ["[abc"], null, ["[abc"]] + , "a right bracket shall lose its special meaning and\n" + + "represent itself in a bracket expression if it occurs\n" + + "first in the list. -- POSIX.2 2.8.3.2" + , ["[]]", ["]"], null, ["]"]] + , ["[]-]", ["]"], null, ["]"]] + , ["[a-\z]", ["p"], null, ["p"]] + , ["??**********?****?", [], { null: true }, ["abc"]] + , ["??**********?****c", [], { null: true }, ["abc"]] + , ["?************c****?****", [], { null: true }, ["abc"]] + , ["*c*?**", [], { null: true }, ["abc"]] + , ["a*****c*?**", [], { null: true }, ["abc"]] + , ["a********???*******", [], { null: true }, ["abc"]] + , ["[]", [], { null: true }, ["a"]] + , ["[abc", [], { null: true }, ["["]] + + , "nocase tests" + , ["XYZ", ["xYz"], { nocase: true, null: true } + , ["xYz", "ABC", "IjK"]] + , ["ab*", ["ABC"], { nocase: true, null: true } + , ["xYz", "ABC", "IjK"]] + , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } + , ["xYz", "ABC", "IjK"]] + + // [ pattern, [matches], MM opts, files, TAP opts] + , "onestar/twostar" + , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] + , ["{/?,*}", ["/a", "bb"], {null: true} + , ["/a", "/b/b", "/a/b/c", "bb"]] + + , "dots should not match unless requested" + , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] + + // .. and . can only match patterns starting with ., + // even when options.dot is set. + , function () { + files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] + } + , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] + , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] + , ["a/*/b", ["a/c/b"], {dot:false}] + , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] + + + // this also tests that changing the options needs + // to change the cache key, even if the pattern is + // the same! + , ["**", ["a/b","a/.d",".a/.d"], { dot: true } + , [ ".a/.d", "a/.d", "a/b"]] + + , "paren sets cannot contain slashes" + , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] + + // brace sets trump all else. + // + // invalid glob pattern. fails on bash4 and bsdglob. + // however, in this implementation, it's easier just + // to do the intuitive thing, and let brace-expansion + // actually come before parsing any extglob patterns, + // like the documentation seems to say. + // + // XXX: if anyone complains about this, either fix it + // or tell them to grow up and stop complaining. + // + // bash/bsdglob says this: + // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] + // but we do this instead: + , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] + + // test partial parsing in the presence of comment/negation chars + , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] + , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] + + // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. + , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" + , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] + , {} + , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] + + + // crazy nested {,,} and *(||) tests. + , function () { + files = [ "a", "b", "c", "d" + , "ab", "ac", "ad" + , "bc", "cb" + , "bc,d", "c,db", "c,d" + , "d)", "(b|c", "*(b|c" + , "b|c", "b|cc", "cb|c" + , "x(a|b|c)", "x(a|c)" + , "(a|b|c)", "(a|c)"] + } + , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] + , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] + // a + // *(b|c) + // *(b|d) + , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] + , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] + + + // test various flag settings. + , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] + , { noext: true } ] + , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} + , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] + , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] + + + // begin channelling Boole and deMorgan... + , "negation tests" + , function () { + files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] + } + + // anything that is NOT a* matches. + , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] + + // anything that IS !a* matches. + , ["!a*", ["!ab", "!abc"], {nonegate: true}] + + // anything that IS a* matches + , ["!!a*", ["a!b"]] + + // anything that is NOT !a* matches + , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] + + // negation nestled within a pattern + , function () { + files = [ "foo.js" + , "foo.bar" + // can't match this one without negative lookbehind. + , "foo.js.js" + , "blar.js" + , "foo." + , "boo.js.boo" ] + } + , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] + + ].forEach(function (c) { + if (typeof c === "function") return c() + if (typeof c === "string") return t.comment(c) + + var pattern = c[0] + , expect = c[1].sort(alpha) + , options = c[2] + , f = c[3] || files + , tapOpts = c[4] || {} + + // options.debug = true + var Class = mm.defaults(options).Minimatch + var m = new Class(pattern, {}) + var r = m.makeRe() + tapOpts.re = String(r) || JSON.stringify(r) + tapOpts.files = JSON.stringify(f) + tapOpts.pattern = pattern + tapOpts.set = m.set + tapOpts.negated = m.negate + + var actual = mm.match(f, pattern, options) + actual.sort(alpha) + + t.equivalent( actual, expect + , JSON.stringify(pattern) + " " + JSON.stringify(expect) + , tapOpts ) + }) + + t.comment("time=" + (Date.now() - start) + "ms") + t.end() +}) + +tap.test("global leak test", function (t) { + var globalAfter = Object.keys(global) + t.equivalent(globalAfter, globalBefore, "no new globals, please") + t.end() +}) + +function alpha (a, b) { + return a > b ? 1 : -1 +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js new file mode 100755 index 0000000..6676e26 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js @@ -0,0 +1,8 @@ +var test = require('tap').test +var minimatch = require('../') + +test('extglob ending with statechar', function(t) { + t.notOk(minimatch('ax', 'a?(b*)')) + t.ok(minimatch('ax', '?(a*|b)')) + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/package.json new file mode 100755 index 0000000..e7ec15f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/package.json @@ -0,0 +1,58 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "glob", + "description": "a little globber", + "version": "3.2.11", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "main": "glob.js", + "engines": { + "node": "*" + }, + "dependencies": { + "inherits": "2", + "minimatch": "0.3" + }, + "devDependencies": { + "tap": "~0.4.0", + "mkdirp": "0", + "rimraf": "1" + }, + "scripts": { + "test": "tap test/*.js", + "test-regen": "TEST_REGEN=1 node test/00-setup.js" + }, + "license": "BSD", + "gitHead": "73f57e99510582b2024b762305970ebcf9b70aa2", + "bugs": { + "url": "https://github.com/isaacs/node-glob/issues" + }, + "homepage": "https://github.com/isaacs/node-glob", + "_id": "glob@3.2.11", + "_shasum": "4a973f635b9190f715d10987d5c00fd2815ebe3d", + "_from": "glob@~3.2.9", + "_npmVersion": "1.4.10", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "4a973f635b9190f715d10987d5c00fd2815ebe3d", + "tarball": "http://registry.npmjs.org/glob/-/glob-3.2.11.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/00-setup.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/00-setup.js new file mode 100755 index 0000000..245afaf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/00-setup.js @@ -0,0 +1,176 @@ +// just a little pre-run script to set up the fixtures. +// zz-finish cleans it up + +var mkdirp = require("mkdirp") +var path = require("path") +var i = 0 +var tap = require("tap") +var fs = require("fs") +var rimraf = require("rimraf") + +var files = +[ "a/.abcdef/x/y/z/a" +, "a/abcdef/g/h" +, "a/abcfed/g/h" +, "a/b/c/d" +, "a/bc/e/f" +, "a/c/d/c/b" +, "a/cb/e/f" +] + +var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c") +var symlinkFrom = "../.." + +files = files.map(function (f) { + return path.resolve(__dirname, f) +}) + +tap.test("remove fixtures", function (t) { + rimraf(path.resolve(__dirname, "a"), function (er) { + t.ifError(er, "remove fixtures") + t.end() + }) +}) + +files.forEach(function (f) { + tap.test(f, function (t) { + var d = path.dirname(f) + mkdirp(d, 0755, function (er) { + if (er) { + t.fail(er) + return t.bailout() + } + fs.writeFile(f, "i like tests", function (er) { + t.ifError(er, "make file") + t.end() + }) + }) + }) +}) + +if (process.platform !== "win32") { + tap.test("symlinky", function (t) { + var d = path.dirname(symlinkTo) + console.error("mkdirp", d) + mkdirp(d, 0755, function (er) { + t.ifError(er) + fs.symlink(symlinkFrom, symlinkTo, "dir", function (er) { + t.ifError(er, "make symlink") + t.end() + }) + }) + }) +} + +;["foo","bar","baz","asdf","quux","qwer","rewq"].forEach(function (w) { + w = "/tmp/glob-test/" + w + tap.test("create " + w, function (t) { + mkdirp(w, function (er) { + if (er) + throw er + t.pass(w) + t.end() + }) + }) +}) + + +// generate the bash pattern test-fixtures if possible +if (process.platform === "win32" || !process.env.TEST_REGEN) { + console.error("Windows, or TEST_REGEN unset. Using cached fixtures.") + return +} + +var spawn = require("child_process").spawn; +var globs = + // put more patterns here. + // anything that would be directly in / should be in /tmp/glob-test + ["test/a/*/+(c|g)/./d" + ,"test/a/**/[cg]/../[cg]" + ,"test/a/{b,c,d,e,f}/**/g" + ,"test/a/b/**" + ,"test/**/g" + ,"test/a/abc{fed,def}/g/h" + ,"test/a/abc{fed/g,def}/**/" + ,"test/a/abc{fed/g,def}/**///**/" + ,"test/**/a/**/" + ,"test/+(a|b|c)/a{/,bc*}/**" + ,"test/*/*/*/f" + ,"test/**/f" + ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**" + ,"{./*/*,/tmp/glob-test/*}" + ,"{/tmp/glob-test/*,*}" // evil owl face! how you taunt me! + ,"test/a/!(symlink)/**" + ] +var bashOutput = {} +var fs = require("fs") + +globs.forEach(function (pattern) { + tap.test("generate fixture " + pattern, function (t) { + var cmd = "shopt -s globstar && " + + "shopt -s extglob && " + + "shopt -s nullglob && " + + // "shopt >&2; " + + "eval \'for i in " + pattern + "; do echo $i; done\'" + var cp = spawn("bash", ["-c", cmd], { cwd: path.dirname(__dirname) }) + var out = [] + cp.stdout.on("data", function (c) { + out.push(c) + }) + cp.stderr.pipe(process.stderr) + cp.on("close", function (code) { + out = flatten(out) + if (!out) + out = [] + else + out = cleanResults(out.split(/\r*\n/)) + + bashOutput[pattern] = out + t.notOk(code, "bash test should finish nicely") + t.end() + }) + }) +}) + +tap.test("save fixtures", function (t) { + var fname = path.resolve(__dirname, "bash-results.json") + var data = JSON.stringify(bashOutput, null, 2) + "\n" + fs.writeFile(fname, data, function (er) { + t.ifError(er) + t.end() + }) +}) + +function cleanResults (m) { + // normalize discrepancies in ordering, duplication, + // and ending slashes. + return m.map(function (m) { + return m.replace(/\/+/g, "/").replace(/\/$/, "") + }).sort(alphasort).reduce(function (set, f) { + if (f !== set[set.length - 1]) set.push(f) + return set + }, []).sort(alphasort).map(function (f) { + // de-windows + return (process.platform !== 'win32') ? f + : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') + }) +} + +function flatten (chunks) { + var s = 0 + chunks.forEach(function (c) { s += c.length }) + var out = new Buffer(s) + s = 0 + chunks.forEach(function (c) { + c.copy(out, s) + s += c.length + }) + + return out.toString().trim() +} + +function alphasort (a, b) { + a = a.toLowerCase() + b = b.toLowerCase() + return a > b ? 1 : a < b ? -1 : 0 +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/bash-comparison.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/bash-comparison.js new file mode 100755 index 0000000..239ed1a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/bash-comparison.js @@ -0,0 +1,63 @@ +// basic test +// show that it does the same thing by default as the shell. +var tap = require("tap") +, child_process = require("child_process") +, bashResults = require("./bash-results.json") +, globs = Object.keys(bashResults) +, glob = require("../") +, path = require("path") + +// run from the root of the project +// this is usually where you're at anyway, but be sure. +process.chdir(path.resolve(__dirname, "..")) + +function alphasort (a, b) { + a = a.toLowerCase() + b = b.toLowerCase() + return a > b ? 1 : a < b ? -1 : 0 +} + +globs.forEach(function (pattern) { + var expect = bashResults[pattern] + // anything regarding the symlink thing will fail on windows, so just skip it + if (process.platform === "win32" && + expect.some(function (m) { + return /\/symlink\//.test(m) + })) + return + + tap.test(pattern, function (t) { + glob(pattern, function (er, matches) { + if (er) + throw er + + // sort and unmark, just to match the shell results + matches = cleanResults(matches) + + t.deepEqual(matches, expect, pattern) + t.end() + }) + }) + + tap.test(pattern + " sync", function (t) { + var matches = cleanResults(glob.sync(pattern)) + + t.deepEqual(matches, expect, "should match shell") + t.end() + }) +}) + +function cleanResults (m) { + // normalize discrepancies in ordering, duplication, + // and ending slashes. + return m.map(function (m) { + return m.replace(/\/+/g, "/").replace(/\/$/, "") + }).sort(alphasort).reduce(function (set, f) { + if (f !== set[set.length - 1]) set.push(f) + return set + }, []).sort(alphasort).map(function (f) { + // de-windows + return (process.platform !== 'win32') ? f + : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/') + }) +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/bash-results.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/bash-results.json new file mode 100755 index 0000000..8051c72 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/bash-results.json @@ -0,0 +1,351 @@ +{ + "test/a/*/+(c|g)/./d": [ + "test/a/b/c/./d" + ], + "test/a/**/[cg]/../[cg]": [ + "test/a/abcdef/g/../g", + "test/a/abcfed/g/../g", + "test/a/b/c/../c", + "test/a/c/../c", + "test/a/c/d/c/../c", + "test/a/symlink/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c" + ], + "test/a/{b,c,d,e,f}/**/g": [], + "test/a/b/**": [ + "test/a/b", + "test/a/b/c", + "test/a/b/c/d" + ], + "test/**/g": [ + "test/a/abcdef/g", + "test/a/abcfed/g" + ], + "test/a/abc{fed,def}/g/h": [ + "test/a/abcdef/g/h", + "test/a/abcfed/g/h" + ], + "test/a/abc{fed/g,def}/**/": [ + "test/a/abcdef", + "test/a/abcdef/g", + "test/a/abcfed/g" + ], + "test/a/abc{fed/g,def}/**///**/": [ + "test/a/abcdef", + "test/a/abcdef/g", + "test/a/abcfed/g" + ], + "test/**/a/**/": [ + "test/a", + "test/a/abcdef", + "test/a/abcdef/g", + "test/a/abcfed", + "test/a/abcfed/g", + "test/a/b", + "test/a/b/c", + "test/a/bc", + "test/a/bc/e", + "test/a/c", + "test/a/c/d", + "test/a/c/d/c", + "test/a/cb", + "test/a/cb/e", + "test/a/symlink", + "test/a/symlink/a", + "test/a/symlink/a/b", + "test/a/symlink/a/b/c", + "test/a/symlink/a/b/c/a", + "test/a/symlink/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b" + ], + "test/+(a|b|c)/a{/,bc*}/**": [ + "test/a/abcdef", + "test/a/abcdef/g", + "test/a/abcdef/g/h", + "test/a/abcfed", + "test/a/abcfed/g", + "test/a/abcfed/g/h" + ], + "test/*/*/*/f": [ + "test/a/bc/e/f", + "test/a/cb/e/f" + ], + "test/**/f": [ + "test/a/bc/e/f", + "test/a/cb/e/f" + ], + "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**": [ + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c" + ], + "{./*/*,/tmp/glob-test/*}": [ + "./examples/g.js", + "./examples/usr-local.js", + "./node_modules/inherits", + "./node_modules/minimatch", + "./node_modules/mkdirp", + "./node_modules/rimraf", + "./node_modules/tap", + "./test/00-setup.js", + "./test/a", + "./test/bash-comparison.js", + "./test/bash-results.json", + "./test/cwd-test.js", + "./test/globstar-match.js", + "./test/mark.js", + "./test/new-glob-optional-options.js", + "./test/nocase-nomagic.js", + "./test/pause-resume.js", + "./test/readme-issue.js", + "./test/root-nomount.js", + "./test/root.js", + "./test/stat.js", + "./test/zz-cleanup.js", + "/tmp/glob-test/asdf", + "/tmp/glob-test/bar", + "/tmp/glob-test/baz", + "/tmp/glob-test/foo", + "/tmp/glob-test/quux", + "/tmp/glob-test/qwer", + "/tmp/glob-test/rewq" + ], + "{/tmp/glob-test/*,*}": [ + "/tmp/glob-test/asdf", + "/tmp/glob-test/bar", + "/tmp/glob-test/baz", + "/tmp/glob-test/foo", + "/tmp/glob-test/quux", + "/tmp/glob-test/qwer", + "/tmp/glob-test/rewq", + "examples", + "glob.js", + "LICENSE", + "node_modules", + "package.json", + "README.md", + "test" + ], + "test/a/!(symlink)/**": [ + "test/a/abcdef", + "test/a/abcdef/g", + "test/a/abcdef/g/h", + "test/a/abcfed", + "test/a/abcfed/g", + "test/a/abcfed/g/h", + "test/a/b", + "test/a/b/c", + "test/a/b/c/d", + "test/a/bc", + "test/a/bc/e", + "test/a/bc/e/f", + "test/a/c", + "test/a/c/d", + "test/a/c/d/c", + "test/a/c/d/c/b", + "test/a/cb", + "test/a/cb/e", + "test/a/cb/e/f" + ] +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/cwd-test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/cwd-test.js new file mode 100755 index 0000000..352c27e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/cwd-test.js @@ -0,0 +1,55 @@ +var tap = require("tap") + +var origCwd = process.cwd() +process.chdir(__dirname) + +tap.test("changing cwd and searching for **/d", function (t) { + var glob = require('../') + var path = require('path') + t.test('.', function (t) { + glob('**/d', function (er, matches) { + t.ifError(er) + t.like(matches, [ 'a/b/c/d', 'a/c/d' ]) + t.end() + }) + }) + + t.test('a', function (t) { + glob('**/d', {cwd:path.resolve('a')}, function (er, matches) { + t.ifError(er) + t.like(matches, [ 'b/c/d', 'c/d' ]) + t.end() + }) + }) + + t.test('a/b', function (t) { + glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) { + t.ifError(er) + t.like(matches, [ 'c/d' ]) + t.end() + }) + }) + + t.test('a/b/', function (t) { + glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) { + t.ifError(er) + t.like(matches, [ 'c/d' ]) + t.end() + }) + }) + + t.test('.', function (t) { + glob('**/d', {cwd: process.cwd()}, function (er, matches) { + t.ifError(er) + t.like(matches, [ 'a/b/c/d', 'a/c/d' ]) + t.end() + }) + }) + + t.test('cd -', function (t) { + process.chdir(origCwd) + t.end() + }) + + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/globstar-match.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/globstar-match.js new file mode 100755 index 0000000..9b234fa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/globstar-match.js @@ -0,0 +1,19 @@ +var Glob = require("../glob.js").Glob +var test = require('tap').test + +test('globstar should not have dupe matches', function(t) { + var pattern = 'a/**/[gh]' + var g = new Glob(pattern, { cwd: __dirname }) + var matches = [] + g.on('match', function(m) { + console.error('match %j', m) + matches.push(m) + }) + g.on('end', function(set) { + console.error('set', set) + matches = matches.sort() + set = set.sort() + t.same(matches, set, 'should have same set of matches') + t.end() + }) +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/mark.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/mark.js new file mode 100755 index 0000000..bf411c0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/mark.js @@ -0,0 +1,118 @@ +var test = require("tap").test +var glob = require('../') +process.chdir(__dirname) + +// expose timing issues +var lag = 5 +glob.Glob.prototype._stat = function(o) { return function(f, cb) { + var args = arguments + setTimeout(function() { + o.call(this, f, cb) + }.bind(this), lag += 5) +}}(glob.Glob.prototype._stat) + + +test("mark, with **", function (t) { + glob("a/*b*/**", {mark: true}, function (er, results) { + if (er) + throw er + var expect = + [ 'a/abcdef/', + 'a/abcdef/g/', + 'a/abcdef/g/h', + 'a/abcfed/', + 'a/abcfed/g/', + 'a/abcfed/g/h', + 'a/b/', + 'a/b/c/', + 'a/b/c/d', + 'a/bc/', + 'a/bc/e/', + 'a/bc/e/f', + 'a/cb/', + 'a/cb/e/', + 'a/cb/e/f' ] + + t.same(results, expect) + t.end() + }) +}) + +test("mark, no / on pattern", function (t) { + glob("a/*", {mark: true}, function (er, results) { + if (er) + throw er + var expect = [ 'a/abcdef/', + 'a/abcfed/', + 'a/b/', + 'a/bc/', + 'a/c/', + 'a/cb/' ] + + if (process.platform !== "win32") + expect.push('a/symlink/') + + t.same(results, expect) + t.end() + }).on('match', function(m) { + t.similar(m, /\/$/) + }) +}) + +test("mark=false, no / on pattern", function (t) { + glob("a/*", function (er, results) { + if (er) + throw er + var expect = [ 'a/abcdef', + 'a/abcfed', + 'a/b', + 'a/bc', + 'a/c', + 'a/cb' ] + + if (process.platform !== "win32") + expect.push('a/symlink') + t.same(results, expect) + t.end() + }).on('match', function(m) { + t.similar(m, /[^\/]$/) + }) +}) + +test("mark=true, / on pattern", function (t) { + glob("a/*/", {mark: true}, function (er, results) { + if (er) + throw er + var expect = [ 'a/abcdef/', + 'a/abcfed/', + 'a/b/', + 'a/bc/', + 'a/c/', + 'a/cb/' ] + if (process.platform !== "win32") + expect.push('a/symlink/') + t.same(results, expect) + t.end() + }).on('match', function(m) { + t.similar(m, /\/$/) + }) +}) + +test("mark=false, / on pattern", function (t) { + glob("a/*/", function (er, results) { + if (er) + throw er + var expect = [ 'a/abcdef/', + 'a/abcfed/', + 'a/b/', + 'a/bc/', + 'a/c/', + 'a/cb/' ] + if (process.platform !== "win32") + expect.push('a/symlink/') + t.same(results, expect) + t.end() + }).on('match', function(m) { + t.similar(m, /\/$/) + }) +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/new-glob-optional-options.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/new-glob-optional-options.js new file mode 100755 index 0000000..3e7dc5a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/new-glob-optional-options.js @@ -0,0 +1,10 @@ +var Glob = require('../glob.js').Glob; +var test = require('tap').test; + +test('new glob, with cb, and no options', function (t) { + new Glob(__filename, function(er, results) { + if (er) throw er; + t.same(results, [__filename]); + t.end(); + }); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/nocase-nomagic.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/nocase-nomagic.js new file mode 100755 index 0000000..2503f23 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/nocase-nomagic.js @@ -0,0 +1,113 @@ +var fs = require('fs'); +var test = require('tap').test; +var glob = require('../'); + +test('mock fs', function(t) { + var stat = fs.stat + var statSync = fs.statSync + var readdir = fs.readdir + var readdirSync = fs.readdirSync + + function fakeStat(path) { + var ret + switch (path.toLowerCase()) { + case '/tmp': case '/tmp/': + ret = { isDirectory: function() { return true } } + break + case '/tmp/a': + ret = { isDirectory: function() { return false } } + break + } + return ret + } + + fs.stat = function(path, cb) { + var f = fakeStat(path); + if (f) { + process.nextTick(function() { + cb(null, f) + }) + } else { + stat.call(fs, path, cb) + } + } + + fs.statSync = function(path) { + return fakeStat(path) || statSync.call(fs, path) + } + + function fakeReaddir(path) { + var ret + switch (path.toLowerCase()) { + case '/tmp': case '/tmp/': + ret = [ 'a', 'A' ] + break + case '/': + ret = ['tmp', 'tMp', 'tMP', 'TMP'] + } + return ret + } + + fs.readdir = function(path, cb) { + var f = fakeReaddir(path) + if (f) + process.nextTick(function() { + cb(null, f) + }) + else + readdir.call(fs, path, cb) + } + + fs.readdirSync = function(path) { + return fakeReaddir(path) || readdirSync.call(fs, path) + } + + t.pass('mocked') + t.end() +}) + +test('nocase, nomagic', function(t) { + var n = 2 + var want = [ '/TMP/A', + '/TMP/a', + '/tMP/A', + '/tMP/a', + '/tMp/A', + '/tMp/a', + '/tmp/A', + '/tmp/a' ] + glob('/tmp/a', { nocase: true }, function(er, res) { + if (er) + throw er + t.same(res.sort(), want) + if (--n === 0) t.end() + }) + glob('/tmp/A', { nocase: true }, function(er, res) { + if (er) + throw er + t.same(res.sort(), want) + if (--n === 0) t.end() + }) +}) + +test('nocase, with some magic', function(t) { + t.plan(2) + var want = [ '/TMP/A', + '/TMP/a', + '/tMP/A', + '/tMP/a', + '/tMp/A', + '/tMp/a', + '/tmp/A', + '/tmp/a' ] + glob('/tmp/*', { nocase: true }, function(er, res) { + if (er) + throw er + t.same(res.sort(), want) + }) + glob('/tmp/*', { nocase: true }, function(er, res) { + if (er) + throw er + t.same(res.sort(), want) + }) +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/pause-resume.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/pause-resume.js new file mode 100755 index 0000000..e1ffbab --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/pause-resume.js @@ -0,0 +1,73 @@ +// show that no match events happen while paused. +var tap = require("tap") +, child_process = require("child_process") +// just some gnarly pattern with lots of matches +, pattern = "test/a/!(symlink)/**" +, bashResults = require("./bash-results.json") +, patterns = Object.keys(bashResults) +, glob = require("../") +, Glob = glob.Glob +, path = require("path") + +// run from the root of the project +// this is usually where you're at anyway, but be sure. +process.chdir(path.resolve(__dirname, "..")) + +function alphasort (a, b) { + a = a.toLowerCase() + b = b.toLowerCase() + return a > b ? 1 : a < b ? -1 : 0 +} + +function cleanResults (m) { + // normalize discrepancies in ordering, duplication, + // and ending slashes. + return m.map(function (m) { + return m.replace(/\/+/g, "/").replace(/\/$/, "") + }).sort(alphasort).reduce(function (set, f) { + if (f !== set[set.length - 1]) set.push(f) + return set + }, []).sort(alphasort).map(function (f) { + // de-windows + return (process.platform !== 'win32') ? f + : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') + }) +} + +var globResults = [] +tap.test("use a Glob object, and pause/resume it", function (t) { + var g = new Glob(pattern) + , paused = false + , res = [] + , expect = bashResults[pattern] + + g.on("pause", function () { + console.error("pause") + }) + + g.on("resume", function () { + console.error("resume") + }) + + g.on("match", function (m) { + t.notOk(g.paused, "must not be paused") + globResults.push(m) + g.pause() + t.ok(g.paused, "must be paused") + setTimeout(g.resume.bind(g), 10) + }) + + g.on("end", function (matches) { + t.pass("reached glob end") + globResults = cleanResults(globResults) + matches = cleanResults(matches) + t.deepEqual(matches, globResults, + "end event matches should be the same as match events") + + t.deepEqual(matches, expect, + "glob matches should be the same as bash results") + + t.end() + }) +}) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/readme-issue.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/readme-issue.js new file mode 100755 index 0000000..0b4e0be --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/readme-issue.js @@ -0,0 +1,36 @@ +var test = require("tap").test +var glob = require("../") + +var mkdirp = require("mkdirp") +var fs = require("fs") +var rimraf = require("rimraf") +var dir = __dirname + "/package" + +test("setup", function (t) { + mkdirp.sync(dir) + fs.writeFileSync(dir + "/package.json", "{}", "ascii") + fs.writeFileSync(dir + "/README", "x", "ascii") + t.pass("setup done") + t.end() +}) + +test("glob", function (t) { + var opt = { + cwd: dir, + nocase: true, + mark: true + } + + glob("README?(.*)", opt, function (er, files) { + if (er) + throw er + t.same(files, ["README"]) + t.end() + }) +}) + +test("cleanup", function (t) { + rimraf.sync(dir) + t.pass("clean") + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/root-nomount.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/root-nomount.js new file mode 100755 index 0000000..3ac5979 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/root-nomount.js @@ -0,0 +1,39 @@ +var tap = require("tap") + +var origCwd = process.cwd() +process.chdir(__dirname) + +tap.test("changing root and searching for /b*/**", function (t) { + var glob = require('../') + var path = require('path') + t.test('.', function (t) { + glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) { + t.ifError(er) + t.like(matches, []) + t.end() + }) + }) + + t.test('a', function (t) { + glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) { + t.ifError(er) + t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ]) + t.end() + }) + }) + + t.test('root=a, cwd=a/b', function (t) { + glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) { + t.ifError(er) + t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ]) + t.end() + }) + }) + + t.test('cd -', function (t) { + process.chdir(origCwd) + t.end() + }) + + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/root.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/root.js new file mode 100755 index 0000000..95c23f9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/root.js @@ -0,0 +1,46 @@ +var t = require("tap") + +var origCwd = process.cwd() +process.chdir(__dirname) + +var glob = require('../') +var path = require('path') + +t.test('.', function (t) { + glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) { + t.ifError(er) + t.like(matches, []) + t.end() + }) +}) + + +t.test('a', function (t) { + console.error("root=" + path.resolve('a')) + glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) { + t.ifError(er) + var wanted = [ + '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' + ].map(function (m) { + return path.join(path.resolve('a'), m).replace(/\\/g, '/') + }) + + t.like(matches, wanted) + t.end() + }) +}) + +t.test('root=a, cwd=a/b', function (t) { + glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) { + t.ifError(er) + t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) { + return path.join(path.resolve('a'), m).replace(/\\/g, '/') + })) + t.end() + }) +}) + +t.test('cd -', function (t) { + process.chdir(origCwd) + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/stat.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/stat.js new file mode 100755 index 0000000..6291711 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/stat.js @@ -0,0 +1,32 @@ +var glob = require('../') +var test = require('tap').test +var path = require('path') + +test('stat all the things', function(t) { + var g = new glob.Glob('a/*abc*/**', { stat: true, cwd: __dirname }) + var matches = [] + g.on('match', function(m) { + matches.push(m) + }) + var stats = [] + g.on('stat', function(m) { + stats.push(m) + }) + g.on('end', function(eof) { + stats = stats.sort() + matches = matches.sort() + eof = eof.sort() + t.same(stats, matches) + t.same(eof, matches) + var cache = Object.keys(this.statCache) + t.same(cache.map(function (f) { + return path.relative(__dirname, f) + }).sort(), matches) + + cache.forEach(function(c) { + t.equal(typeof this.statCache[c], 'object') + }, this) + + t.end() + }) +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/zz-cleanup.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/zz-cleanup.js new file mode 100755 index 0000000..e085f0f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/glob/test/zz-cleanup.js @@ -0,0 +1,11 @@ +// remove the fixtures +var tap = require("tap") +, rimraf = require("rimraf") +, path = require("path") + +tap.test("cleanup fixtures", function (t) { + rimraf(path.resolve(__dirname, "a"), function (er) { + t.ifError(er, "removed") + t.end() + }) +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/inherits/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/inherits/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/inherits/inherits.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/inherits/inherits.js new file mode 100755 index 0000000..29f5e24 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/inherits/inherits.js @@ -0,0 +1 @@ +module.exports = require('util').inherits diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/inherits/inherits_browser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/inherits/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/inherits/package.json new file mode 100755 index 0000000..6c556ed --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/inherits/package.json @@ -0,0 +1,50 @@ +{ + "name": "inherits", + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "version": "2.0.1", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "main": "./inherits.js", + "browser": "./inherits_browser.js", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inherits" + }, + "license": "ISC", + "scripts": { + "test": "node test" + }, + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, + "_id": "inherits@2.0.1", + "dist": { + "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "_from": "inherits@~2.0.1", + "_npmVersion": "1.3.8", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "readme": "ERROR: No README data found!", + "homepage": "https://github.com/isaacs/inherits" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/inherits/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/inherits/test.js new file mode 100755 index 0000000..fc53012 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/inherits/test.js @@ -0,0 +1,25 @@ +var inherits = require('./inherits.js') +var assert = require('assert') + +function test(c) { + assert(c.constructor === Child) + assert(c.constructor.super_ === Parent) + assert(Object.getPrototypeOf(c) === Child.prototype) + assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) + assert(c instanceof Child) + assert(c instanceof Parent) +} + +function Child() { + Parent.call(this) + test(this) +} + +function Parent() {} + +inherits(Child, Parent) + +var c = new Child +test(c) + +console.log('ok') diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/.travis.yml new file mode 100755 index 0000000..cc4dba2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/LICENSE new file mode 100755 index 0000000..ee27ba4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/example/all.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/example/all.js new file mode 100755 index 0000000..6d2d4be --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/example/all.js @@ -0,0 +1,17 @@ +var inspect = require('../'); +var holes = [ 'a', 'b' ]; +holes[4] = 'e', holes[6] = 'g'; +var obj = { + a: 1, + b: [ 3, 4, undefined, null ], + c: undefined, + d: null, + e: { + regex: /^x/i, + buf: new Buffer('abc'), + holes: holes + }, + now: new Date +}; +obj.self = obj; +console.log(inspect(obj)); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/example/circular.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/example/circular.js new file mode 100755 index 0000000..1006d0c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/example/circular.js @@ -0,0 +1,4 @@ +var inspect = require('../'); +var obj = { a: 1, b: [3,4] }; +obj.c = obj; +console.log(inspect(obj)); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/example/fn.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/example/fn.js new file mode 100755 index 0000000..4c00ba6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/example/fn.js @@ -0,0 +1,3 @@ +var inspect = require('../'); +var obj = [ 1, 2, function f (n) { return n + 5 }, 4 ]; +console.log(inspect(obj)); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/example/inspect.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/example/inspect.js new file mode 100755 index 0000000..b5ad4d1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/example/inspect.js @@ -0,0 +1,7 @@ +var inspect = require('../'); + +var d = document.createElement('div'); +d.setAttribute('id', 'beep'); +d.innerHTML = 'woooiiiii'; + +console.log(inspect([ d, { a: 3, b : 4, c: [5,6,[7,[8,[9]]]] } ])); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/index.js new file mode 100755 index 0000000..2fa2225 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/index.js @@ -0,0 +1,127 @@ +module.exports = function inspect_ (obj, opts, depth, seen) { + if (!opts) opts = {}; + + var maxDepth = opts.depth === undefined ? 5 : opts.depth; + if (depth === undefined) depth = 0; + if (depth > maxDepth && maxDepth > 0) return '...'; + + if (seen === undefined) seen = []; + else if (indexOf(seen, obj) >= 0) { + return '[Circular]'; + } + + function inspect (value, from) { + if (from) { + seen = seen.slice(); + seen.push(from); + } + return inspect_(value, opts, depth + 1, seen); + } + + if (typeof obj === 'string') { + return inspectString(obj); + } + else if (typeof obj === 'function') { + var name = nameOf(obj); + return '[Function' + (name ? ': ' + name : '') + ']'; + } + else if (obj === null) { + return 'null'; + } + else if (isElement(obj)) { + var s = '<' + String(obj.nodeName).toLowerCase(); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += ' ' + attrs[i].name + '="' + quote(attrs[i].value) + '"'; + } + s += '>'; + if (obj.childNodes && obj.childNodes.length) s += '...'; + s += ''; + return s; + } + else if (isArray(obj)) { + if (obj.length === 0) return '[]'; + var xs = Array(obj.length); + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + } + return '[ ' + xs.join(', ') + ' ]'; + } + else if (typeof obj === 'object' && typeof obj.inspect === 'function') { + return obj.inspect(); + } + else if (typeof obj === 'object' && !isDate(obj) && !isRegExp(obj)) { + var xs = [], keys = []; + for (var key in obj) { + if (has(obj, key)) keys.push(key); + } + keys.sort(); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (/[^\w$]/.test(key)) { + xs.push(inspect(key) + ': ' + inspect(obj[key], obj)); + } + else xs.push(key + ': ' + inspect(obj[key], obj)); + } + if (xs.length === 0) return '{}'; + return '{ ' + xs.join(', ') + ' }'; + } + else return String(obj); +}; + +function quote (s) { + return String(s).replace(/"/g, '"'); +} + +function isArray (obj) { + return {}.toString.call(obj) === '[object Array]'; +} + +function isDate (obj) { + return {}.toString.call(obj) === '[object Date]'; +} + +function isRegExp (obj) { + return {}.toString.call(obj) === '[object RegExp]'; +} + +function has (obj, key) { + if (!{}.hasOwnProperty) return key in obj; + return {}.hasOwnProperty.call(obj, key); +} + +function nameOf (f) { + if (f.name) return f.name; + var m = f.toString().match(/^function\s*([\w$]+)/); + if (m) return m[1]; +} + +function indexOf (xs, x) { + if (xs.indexOf) return xs.indexOf(x); + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} + +function isElement (x) { + if (!x || typeof x !== 'object') return false; + if (typeof HTMLElement !== 'undefined') { + return x instanceof HTMLElement; + } + else return typeof x.nodeName === 'string' + && typeof x.getAttribute === 'function' + ; +} + +function inspectString (str) { + var s = str.replace(/(['\\])/g, '\\$1').replace(/[\x00-\x1f]/g, lowbyte); + return "'" + s + "'"; + + function lowbyte (c) { + var n = c.charCodeAt(0); + var x = { 8: 'b', 9: 't', 10: 'n', 12: 'f', 13: 'r' }[n]; + if (x) return '\\' + x; + return '\\x' + (n < 0x10 ? '0' : '') + n.toString(16); + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/package.json new file mode 100755 index 0000000..613f9c7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/package.json @@ -0,0 +1,70 @@ +{ + "name": "object-inspect", + "version": "0.4.0", + "description": "string representations of objects in node and the browser", + "main": "index.js", + "devDependencies": { + "tape": "~2.6.0" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": [ + "test/*.js", + "test/browser/*.js" + ], + "browsers": [ + "ie/6..latest", + "chrome/latest", + "firefox/latest", + "safari/latest", + "opera/latest", + "iphone/latest", + "ipad/latest", + "android/latest" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/object-inspect.git" + }, + "homepage": "https://github.com/substack/object-inspect", + "keywords": [ + "inspect", + "util.inspect", + "object", + "stringify", + "pretty" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/substack/object-inspect/issues" + }, + "_id": "object-inspect@0.4.0", + "dist": { + "shasum": "f5157c116c1455b243b06ee97703392c5ad89fec", + "tarball": "http://registry.npmjs.org/object-inspect/-/object-inspect-0.4.0.tgz" + }, + "_from": "object-inspect@~0.4.0", + "_npmVersion": "1.4.4", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, + "_shasum": "f5157c116c1455b243b06ee97703392c5ad89fec", + "_resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-0.4.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/readme.markdown b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/readme.markdown new file mode 100755 index 0000000..41959a4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/readme.markdown @@ -0,0 +1,59 @@ +# object-inspect + +string representations of objects in node and the browser + +[![testling badge](https://ci.testling.com/substack/object-inspect.png)](https://ci.testling.com/substack/object-inspect) + +[![build status](https://secure.travis-ci.org/substack/object-inspect.png)](http://travis-ci.org/substack/object-inspect) + +# example + +## circular + +``` js +var inspect = require('object-inspect'); +var obj = { a: 1, b: [3,4] }; +obj.c = obj; +console.log(inspect(obj)); +``` + +## dom element + +``` js +var inspect = require('object-inspect'); + +var d = document.createElement('div'); +d.setAttribute('id', 'beep'); +d.innerHTML = 'woooiiiii'; + +console.log(inspect([ d, { a: 3, b : 4, c: [5,6,[7,[8,[9]]]] } ])); +``` + +output: + +``` +[
    ...
    , { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [ ... ] ] ] ] } ] +``` + +# methods + +``` js +var inspect = require('object-inspect') +``` + +## var s = inspect(obj, opts={}) + +Return a string `s` with the string representation of `obj` up to a depth of +`opts.depth`. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install object-inspect +``` + +# license + +MIT diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/browser/dom.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/browser/dom.js new file mode 100755 index 0000000..30d0b7e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/browser/dom.js @@ -0,0 +1,15 @@ +var inspect = require('../../'); +var test = require('tape'); + +test('dom element', function (t) { + t.plan(1); + + var d = document.createElement('div'); + d.setAttribute('id', 'beep'); + d.innerHTML = 'woooiiiii'; + + t.equal( + inspect([ d, { a: 3, b : 4, c: [5,6,[7,[8,[9]]]] } ]), + '[
    ...
    , { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [ ... ] ] ] ] } ]' + ); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/circular.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/circular.js new file mode 100755 index 0000000..28598a7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/circular.js @@ -0,0 +1,9 @@ +var inspect = require('../'); +var test = require('tape'); + +test('circular', function (t) { + t.plan(1); + var obj = { a: 1, b: [3,4] }; + obj.c = obj; + t.equal(inspect(obj), '{ a: 1, b: [ 3, 4 ], c: [Circular] }'); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/fn.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/fn.js new file mode 100755 index 0000000..cdf97dd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/fn.js @@ -0,0 +1,8 @@ +var inspect = require('../'); +var test = require('tape'); + +test('function', function (t) { + t.plan(1); + var obj = [ 1, 2, function f (n) { return n + 5 }, 4 ]; + t.equal(inspect(obj), '[ 1, 2, [Function: f], 4 ]'); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/holes.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/holes.js new file mode 100755 index 0000000..ae54de4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/holes.js @@ -0,0 +1,15 @@ +var test = require('tape'); +var inspect = require('../'); + +var xs = [ 'a', 'b' ]; +xs[5] = 'f'; +xs[7] = 'j'; +xs[8] = 'k'; + +test('holes', function (t) { + t.plan(1); + t.equal( + inspect(xs), + "[ 'a', 'b', , , , 'f', , 'j', 'k' ]" + ); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/lowbyte.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/lowbyte.js new file mode 100755 index 0000000..debd59c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/lowbyte.js @@ -0,0 +1,12 @@ +var test = require('tape'); +var inspect = require('../'); + +var obj = { x: 'a\r\nb', y: '\5! \x1f \022' }; + +test('interpolate low bytes', function (t) { + t.plan(1); + t.equal( + inspect(obj), + "{ x: 'a\\r\\nb', y: '\\x05! \\x1f \\x12' }" + ); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/undef.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/undef.js new file mode 100755 index 0000000..833238f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/object-inspect/test/undef.js @@ -0,0 +1,12 @@ +var test = require('tape'); +var inspect = require('../'); + +var obj = { a: 1, b: [ 3, 4, undefined, null ], c: undefined, d: null }; + +test('undef and null', function (t) { + t.plan(1); + t.equal( + inspect(obj), + '{ a: 1, b: [ 3, 4, undefined, null ], c: undefined, d: null }' + ); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/.travis.yml new file mode 100755 index 0000000..cc4dba2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/LICENSE new file mode 100755 index 0000000..ee27ba4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/example/resume.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/example/resume.js new file mode 100755 index 0000000..d04e61a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/example/resume.js @@ -0,0 +1,8 @@ +var resumer = require('../'); +createStream().pipe(process.stdout); + +function createStream () { + var stream = resumer(); + stream.queue('beep boop\n'); + return stream; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/index.js new file mode 100755 index 0000000..14de798 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/index.js @@ -0,0 +1,29 @@ +var through = require('through'); +var nextTick = typeof setImmediate !== 'undefined' + ? setImmediate + : process.nextTick +; + +module.exports = function (write, end) { + var tr = through(write, end); + tr.pause(); + var resume = tr.resume; + var pause = tr.pause; + var paused = false; + + tr.pause = function () { + paused = true; + return pause.apply(this, arguments); + }; + + tr.resume = function () { + paused = false; + return resume.apply(this, arguments); + }; + + nextTick(function () { + if (!paused) tr.resume(); + }); + + return tr; +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/package.json new file mode 100755 index 0000000..bede0fb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/package.json @@ -0,0 +1,71 @@ +{ + "name": "resumer", + "version": "0.0.0", + "description": "a through stream that starts paused and resumes on the next tick", + "main": "index.js", + "dependencies": { + "through": "~2.3.4" + }, + "devDependencies": { + "tap": "~0.4.0", + "tape": "~1.0.2", + "concat-stream": "~0.1.1" + }, + "scripts": { + "test": "tap test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "chrome/20..latest", + "firefox/10..latest", + "safari/latest", + "opera/11.0..latest", + "iphone/6", + "ipad/6" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/resumer.git" + }, + "homepage": "https://github.com/substack/resumer", + "keywords": [ + "through", + "stream", + "pause", + "resume" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "readme": "# resumer\n\nReturn a through stream that starts out paused and resumes on the next tick,\nunless somebody called `.pause()`.\n\nThis module has the same signature as\n[through](https://npmjs.com/package/through).\n\n[![browser support](https://ci.testling.com/substack/resumer.png)](http://ci.testling.com/substack/resumer)\n\n[![build status](https://secure.travis-ci.org/substack/resumer.png)](http://travis-ci.org/substack/resumer)\n\n# example\n\n``` js\nvar resumer = require('resumer');\nvar s = createStream();\ns.pipe(process.stdout);\n\nfunction createStream () {\n var stream = resumer();\n stream.queue('beep boop\\n');\n return stream;\n}\n```\n\n```\n$ node example/resume.js\nbeep boop\n```\n\n# methods\n\n``` js\nvar resumer = require('resumer')\n```\n\n## resumer(write, end)\n\nReturn a new through stream from `write` and `end`, which default to\npass-through `.queue()` functions if not specified.\n\nThe stream starts out paused and will be resumed on the next tick unless you\ncall `.pause()` first.\n\n`write` and `end` get passed directly through to\n[through](https://npmjs.com/package/through).\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install resumer\n```\n\n# license\n\nMIT\n", + "readmeFilename": "readme.markdown", + "_id": "resumer@0.0.0", + "dist": { + "shasum": "f1e8f461e4064ba39e82af3cdc2a8c893d076759", + "tarball": "http://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz" + }, + "_from": "resumer@~0.0.0", + "_npmVersion": "1.2.2", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, + "_shasum": "f1e8f461e4064ba39e82af3cdc2a8c893d076759", + "_resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", + "bugs": { + "url": "https://github.com/substack/resumer/issues" + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/readme.markdown b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/readme.markdown new file mode 100755 index 0000000..5d9df66 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/readme.markdown @@ -0,0 +1,59 @@ +# resumer + +Return a through stream that starts out paused and resumes on the next tick, +unless somebody called `.pause()`. + +This module has the same signature as +[through](https://npmjs.com/package/through). + +[![browser support](https://ci.testling.com/substack/resumer.png)](http://ci.testling.com/substack/resumer) + +[![build status](https://secure.travis-ci.org/substack/resumer.png)](http://travis-ci.org/substack/resumer) + +# example + +``` js +var resumer = require('resumer'); +var s = createStream(); +s.pipe(process.stdout); + +function createStream () { + var stream = resumer(); + stream.queue('beep boop\n'); + return stream; +} +``` + +``` +$ node example/resume.js +beep boop +``` + +# methods + +``` js +var resumer = require('resumer') +``` + +## resumer(write, end) + +Return a new through stream from `write` and `end`, which default to +pass-through `.queue()` functions if not specified. + +The stream starts out paused and will be resumed on the next tick unless you +call `.pause()` first. + +`write` and `end` get passed directly through to +[through](https://npmjs.com/package/through). + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install resumer +``` + +# license + +MIT diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/test/resume.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/test/resume.js new file mode 100755 index 0000000..1eaecac --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/test/resume.js @@ -0,0 +1,37 @@ +var test = require('tape'); +var resumer = require('../'); +var concat = require('concat-stream'); + +test('implicit resume', function (t) { + t.plan(1); + + var s = createStream(); + s.pipe(concat(function (err, body) { + t.equal(body, 'beep boop\n'); + })); +}); + +test('pause/resume', function (t) { + t.plan(2); + + var s = createStream(); + s.pause(); + + var paused = true; + setTimeout(function () { + paused = false; + s.resume(); + }, 100); + + s.pipe(concat(function (err, body) { + t.equal(paused, false); + t.equal(body, 'beep boop\n'); + })); +}); + +function createStream () { + var stream = resumer(); + stream.queue('beep boop\n'); + stream.queue(null); + return stream; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/test/through.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/test/through.js new file mode 100755 index 0000000..ddcaf48 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/resumer/test/through.js @@ -0,0 +1,36 @@ +var test = require('tape'); +var resumer = require('../'); +var concat = require('concat-stream'); + +test('through write/end', function (t) { + t.plan(2); + + var s = createStream(); + + s.on('okok', function () { + t.ok(true); + }); + + s.pipe(concat(function (err, body) { + t.equal(body, 'BEGIN\nRAWR\nEND\n'); + })); + + setTimeout(function () { + s.end('rawr\n'); + }, 50); +}); + +function createStream () { + var stream = resumer(write, end); + stream.queue('BEGIN\n'); + return stream; + + function write (x) { + this.queue(String(x).toUpperCase()); + } + function end () { + this.emit('okok'); + this.queue('END\n'); + this.queue(null); + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/.travis.yml new file mode 100755 index 0000000..c693a93 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - 0.6 + - 0.8 + - "0.10" diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/LICENSE.APACHE2 b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/LICENSE.APACHE2 new file mode 100755 index 0000000..6366c04 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/LICENSE.MIT b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/LICENSE.MIT new file mode 100755 index 0000000..6eafbd7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +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/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/index.js new file mode 100755 index 0000000..ca5fc59 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/index.js @@ -0,0 +1,108 @@ +var Stream = require('stream') + +// through +// +// a stream that does nothing but re-emit the input. +// useful for aggregating a series of changing but not ending streams into one stream) + +exports = module.exports = through +through.through = through + +//create a readable writable stream. + +function through (write, end, opts) { + write = write || function (data) { this.queue(data) } + end = end || function () { this.queue(null) } + + var ended = false, destroyed = false, buffer = [], _ended = false + var stream = new Stream() + stream.readable = stream.writable = true + stream.paused = false + +// stream.autoPause = !(opts && opts.autoPause === false) + stream.autoDestroy = !(opts && opts.autoDestroy === false) + + stream.write = function (data) { + write.call(this, data) + return !stream.paused + } + + function drain() { + while(buffer.length && !stream.paused) { + var data = buffer.shift() + if(null === data) + return stream.emit('end') + else + stream.emit('data', data) + } + } + + stream.queue = stream.push = function (data) { +// console.error(ended) + if(_ended) return stream + if(data === null) _ended = true + buffer.push(data) + drain() + return stream + } + + //this will be registered as the first 'end' listener + //must call destroy next tick, to make sure we're after any + //stream piped from here. + //this is only a problem if end is not emitted synchronously. + //a nicer way to do this is to make sure this is the last listener for 'end' + + stream.on('end', function () { + stream.readable = false + if(!stream.writable && stream.autoDestroy) + process.nextTick(function () { + stream.destroy() + }) + }) + + function _end () { + stream.writable = false + end.call(stream) + if(!stream.readable && stream.autoDestroy) + stream.destroy() + } + + stream.end = function (data) { + if(ended) return + ended = true + if(arguments.length) stream.write(data) + _end() // will emit or queue + return stream + } + + stream.destroy = function () { + if(destroyed) return + destroyed = true + ended = true + buffer.length = 0 + stream.writable = stream.readable = false + stream.emit('close') + return stream + } + + stream.pause = function () { + if(stream.paused) return + stream.paused = true + return stream + } + + stream.resume = function () { + if(stream.paused) { + stream.paused = false + stream.emit('resume') + } + drain() + //may have become paused again, + //as drain emits 'data'. + if(!stream.paused) + stream.emit('drain') + return stream + } + return stream +} + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/package.json new file mode 100755 index 0000000..a6d08b9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/package.json @@ -0,0 +1,66 @@ +{ + "name": "through", + "version": "2.3.8", + "description": "simplified stream construction", + "main": "index.js", + "scripts": { + "test": "set -e; for t in test/*.js; do node $t; done" + }, + "devDependencies": { + "stream-spec": "~0.3.5", + "tape": "~2.3.2", + "from": "~0.1.3" + }, + "keywords": [ + "stream", + "streams", + "user-streams", + "pipe" + ], + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "dominictarr.com" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/dominictarr/through.git" + }, + "homepage": "https://github.com/dominictarr/through", + "testling": { + "browsers": [ + "ie/8..latest", + "ff/15..latest", + "chrome/20..latest", + "safari/5.1..latest" + ], + "files": "test/*.js" + }, + "gitHead": "2c5a6f9a0cc54da759b6e10964f2081c358e49dc", + "bugs": { + "url": "https://github.com/dominictarr/through/issues" + }, + "_id": "through@2.3.8", + "_shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", + "_from": "through@~2.3.4", + "_npmVersion": "2.12.0", + "_nodeVersion": "2.3.1", + "_npmUser": { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + }, + "maintainers": [ + { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + } + ], + "dist": { + "shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", + "tarball": "http://registry.npmjs.org/through/-/through-2.3.8.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/readme.markdown b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/readme.markdown new file mode 100755 index 0000000..cb34c81 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/readme.markdown @@ -0,0 +1,64 @@ +#through + +[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) +[![testling badge](https://ci.testling.com/dominictarr/through.png)](https://ci.testling.com/dominictarr/through) + +Easy way to create a `Stream` that is both `readable` and `writable`. + +* Pass in optional `write` and `end` methods. +* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. +* Use `this.pause()` and `this.resume()` to manage flow. +* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`). + +This function is the basis for most of the synchronous streams in +[event-stream](http://github.com/dominictarr/event-stream). + +``` js +var through = require('through') + +through(function write(data) { + this.queue(data) //data *must* not be null + }, + function end () { //optional + this.queue(null) + }) +``` + +Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`, +and this.emit('end') + +``` js +var through = require('through') + +through(function write(data) { + this.emit('data', data) + //this.pause() + }, + function end () { //optional + this.emit('end') + }) +``` + +## Extended Options + +You will probably not need these 99% of the time. + +### autoDestroy=false + +By default, `through` emits close when the writable +and readable side of the stream has ended. +If that is not desired, set `autoDestroy=false`. + +``` js +var through = require('through') + +//like this +var ts = through(write, end, {autoDestroy: false}) +//or like this +var ts = through(write, end) +ts.autoDestroy = false +``` + +## License + +MIT / Apache2 diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/async.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/async.js new file mode 100755 index 0000000..46bdbae --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/async.js @@ -0,0 +1,28 @@ +var from = require('from') +var through = require('../') + +var tape = require('tape') + +tape('simple async example', function (t) { + + var n = 0, expected = [1,2,3,4,5], actual = [] + from(expected) + .pipe(through(function(data) { + this.pause() + n ++ + setTimeout(function(){ + console.log('pushing data', data) + this.push(data) + this.resume() + }.bind(this), 300) + })).pipe(through(function(data) { + console.log('pushing data second time', data); + this.push(data) + })).on('data', function (d) { + actual.push(d) + }).on('end', function() { + t.deepEqual(actual, expected) + t.end() + }) + +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/auto-destroy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/auto-destroy.js new file mode 100755 index 0000000..9a8fd00 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/auto-destroy.js @@ -0,0 +1,30 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('end before close', function (assert) { + var ts = through() + ts.autoDestroy = false + var ended = false, closed = false + + ts.on('end', function () { + assert.ok(!closed) + ended = true + }) + ts.on('close', function () { + assert.ok(ended) + closed = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.ok(ended) + assert.notOk(closed) + ts.destroy() + assert.ok(closed) + assert.end() +}) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/buffering.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/buffering.js new file mode 100755 index 0000000..b0084bf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/buffering.js @@ -0,0 +1,71 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('buffering', function(assert) { + var ts = through(function (data) { + this.queue(data) + }, function () { + this.queue(null) + }) + + var ended = false, actual = [] + + ts.on('data', actual.push.bind(actual)) + ts.on('end', function () { + ended = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + assert.deepEqual(actual, [1, 2, 3]) + ts.pause() + ts.write(4) + ts.write(5) + ts.write(6) + assert.deepEqual(actual, [1, 2, 3]) + ts.resume() + assert.deepEqual(actual, [1, 2, 3, 4, 5, 6]) + ts.pause() + ts.end() + assert.ok(!ended) + ts.resume() + assert.ok(ended) + assert.end() +}) + +test('buffering has data in queue, when ends', function (assert) { + + /* + * If stream ends while paused with data in the queue, + * stream should still emit end after all data is written + * on resume. + */ + + var ts = through(function (data) { + this.queue(data) + }, function () { + this.queue(null) + }) + + var ended = false, actual = [] + + ts.on('data', actual.push.bind(actual)) + ts.on('end', function () { + ended = true + }) + + ts.pause() + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.deepEqual(actual, [], 'no data written yet, still paused') + assert.ok(!ended, 'end not emitted yet, still paused') + ts.resume() + assert.deepEqual(actual, [1, 2, 3], 'resumed, all data should be delivered') + assert.ok(ended, 'end should be emitted once all data was delivered') + assert.end(); +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/end.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/end.js new file mode 100755 index 0000000..fa113f5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/end.js @@ -0,0 +1,45 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('end before close', function (assert) { + var ts = through() + var ended = false, closed = false + + ts.on('end', function () { + assert.ok(!closed) + ended = true + }) + ts.on('close', function () { + assert.ok(ended) + closed = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.ok(ended) + assert.ok(closed) + assert.end() +}) + +test('end only once', function (t) { + + var ts = through() + var ended = false, closed = false + + ts.on('end', function () { + t.equal(ended, false) + ended = true + }) + + ts.queue(null) + ts.queue(null) + ts.queue(null) + + ts.resume() + + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/index.js new file mode 100755 index 0000000..96da82f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/node_modules/through/test/index.js @@ -0,0 +1,133 @@ + +var test = require('tape') +var spec = require('stream-spec') +var through = require('../') + +/* + I'm using these two functions, and not streams and pipe + so there is less to break. if this test fails it must be + the implementation of _through_ +*/ + +function write(array, stream) { + array = array.slice() + function next() { + while(array.length) + if(stream.write(array.shift()) === false) + return stream.once('drain', next) + + stream.end() + } + + next() +} + +function read(stream, callback) { + var actual = [] + stream.on('data', function (data) { + actual.push(data) + }) + stream.once('end', function () { + callback(null, actual) + }) + stream.once('error', function (err) { + callback(err) + }) +} + +test('simple defaults', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through() + var s = spec(t).through().pausable() + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected) + assert.end() + }) + + t.on('close', s.validate) + + write(expected, t) +}); + +test('simple functions', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through(function (data) { + this.emit('data', data*2) + }) + var s = spec(t).through().pausable() + + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected.map(function (data) { + return data*2 + })) + assert.end() + }) + + t.on('close', s.validate) + + write(expected, t) +}) + +test('pauses', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l) //Math.random()) + + var t = through() + + var s = spec(t) + .through() + .pausable() + + t.on('data', function () { + if(Math.random() > 0.1) return + t.pause() + process.nextTick(function () { + t.resume() + }) + }) + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected) + }) + + t.on('close', function () { + s.validate() + assert.end() + }) + + write(expected, t) +}) + +test('does not soft-end on `undefined`', function(assert) { + var stream = through() + , count = 0 + + stream.on('data', function (data) { + count++ + }) + + stream.write(undefined) + stream.write(undefined) + + assert.equal(count, 2) + + assert.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/package.json new file mode 100755 index 0000000..998806b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/package.json @@ -0,0 +1,88 @@ +{ + "name": "tape", + "version": "3.5.0", + "description": "tap-producing test harness for node and browsers", + "main": "index.js", + "bin": { + "tape": "./bin/tape" + }, + "directories": { + "example": "example", + "test": "test" + }, + "dependencies": { + "deep-equal": "~0.2.0", + "defined": "~0.0.0", + "glob": "~3.2.9", + "inherits": "~2.0.1", + "object-inspect": "~0.4.0", + "resumer": "~0.0.0", + "through": "~2.3.4" + }, + "devDependencies": { + "tap": "~0.4.8", + "falafel": "~0.3.1", + "concat-stream": "~1.4.1" + }, + "scripts": { + "test": "tap test/*.js" + }, + "testling": { + "files": "test/browser/*.js", + "browsers": [ + "ie/6..latest", + "chrome/20..latest", + "firefox/10..latest", + "safari/latest", + "opera/11.0..latest", + "iphone/6", + "ipad/6" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/tape.git" + }, + "homepage": "https://github.com/substack/tape", + "keywords": [ + "tap", + "test", + "harness", + "assert", + "browser" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "gitHead": "51f2f97d7eade23b1e23b7cfea37f449ade5b9c3", + "bugs": { + "url": "https://github.com/substack/tape/issues" + }, + "_id": "tape@3.5.0", + "_shasum": "aebb061388104ad0cb407be842782049d64624f8", + "_from": "tape@^3.5.0", + "_npmVersion": "1.4.28", + "_npmUser": { + "name": "raynos", + "email": "raynos2@gmail.com" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "raynos", + "email": "raynos2@gmail.com" + } + ], + "dist": { + "shasum": "aebb061388104ad0cb407be842782049d64624f8", + "tarball": "http://registry.npmjs.org/tape/-/tape-3.5.0.tgz" + }, + "_resolved": "https://registry.npmjs.org/tape/-/tape-3.5.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/readme.markdown b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/readme.markdown new file mode 100755 index 0000000..7a3263f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/readme.markdown @@ -0,0 +1,317 @@ +# tape + +tap-producing test harness for node and browsers + +[![browser support](https://ci.testling.com/substack/tape.png)](http://ci.testling.com/substack/tape) + +[![build status](https://secure.travis-ci.org/substack/tape.png)](http://travis-ci.org/substack/tape) + +![tape](http://substack.net/images/tape_drive.png) + +# example + +``` js +var test = require('tape'); + +test('timing test', function (t) { + t.plan(2); + + t.equal(typeof Date.now, 'function'); + var start = Date.now(); + + setTimeout(function () { + t.equal(Date.now() - start, 100); + }, 100); +}); +``` + +``` +$ node example/timing.js +TAP version 13 +# timing test +ok 1 should be equal +not ok 2 should be equal + --- + operator: equal + expected: 100 + actual: 107 + ... + +1..2 +# tests 2 +# pass 1 +# fail 1 +``` + +# pretty reporters + +The default TAP output is good for machines and humans that are robots. + +If you want a more colorful / pretty output there are lots of modules on npm +that will output something pretty if you pipe TAP into them: + + - https://github.com/scottcorgan/tap-spec + - https://github.com/scottcorgan/tap-dot + - https://github.com/substack/faucet + - https://github.com/juliangruber/tap-bail + - https://github.com/kirbysayshi/tap-browser-color + - https://github.com/gummesson/tap-json + - https://github.com/gummesson/tap-min + - https://github.com/calvinmetcalf/tap-nyan + - https://www.npmjs.org/package/tap-pessimist + - https://github.com/toolness/tap-prettify + - https://github.com/shuhei/colortape + - https://github.com/aghassemi/tap-xunit + +To use them, try `node test/index.js | tap-spec` or pipe it into one +of the modules of your choice! + +# uncaught exceptions + +By default, uncaught exceptions in your tests will not be intercepted, and will cause tape to crash. If you find this behavior undesirable, use [tape-catch](https://github.com/michaelrhodes/tape-catch) to report any exceptions as TAP errors. + +# methods + +The assertion methods in tape are heavily influenced or copied from the methods +in [node-tap](https://github.com/isaacs/node-tap). + +``` +var test = require('tape') +``` + +## test([name], [opts], cb) + +Create a new test with an optional `name` string and optional `opts` object. +`cb(t)` fires with the new test object `t` once all preceeding tests have +finished. Tests execute serially. + +Available `opts` options are: +- opts.skip = true/false. See test.skip. +- opts.timeout = 500. Set a timeout for the test, after which it will fail. + See test.timeoutAfter. + +If you forget to `t.plan()` out how many assertions you are going to run and you +don't call `t.end()` explicitly, your test will hang. + +## test.skip(name, cb) + +Generate a new test that will be skipped over. + +## t.plan(n) + +Declare that `n` assertions should be run. `t.end()` will be called +automatically after the `n`th assertion. If there are any more assertions after +the `n`th, or after `t.end()` is called, they will generate errors. + +## t.end(err) + +Declare the end of a test explicitly. If `err` is passed in `t.end` will assert +that it is falsey. + +## t.fail(msg) + +Generate a failing assertion with a message `msg`. + +## t.pass(msg) + +Generate a passing assertion with a message `msg`. + +## t.timeoutAfter(ms) + +Automatically timeout the test after X ms. + +## t.skip(msg) + +Generate an assertion that will be skipped over. + +## t.ok(value, msg) + +Assert that `value` is truthy with an optional description message `msg`. + +Aliases: `t.true()`, `t.assert()` + +## t.notOk(value, msg) + +Assert that `value` is falsy with an optional description message `msg`. + +Aliases: `t.false()`, `t.notok()` + +## t.error(err, msg) + +Assert that `err` is falsy. If `err` is non-falsy, use its `err.message` as the +description message. + +Aliases: `t.ifError()`, `t.ifErr()`, `t.iferror()` + +## t.equal(actual, expected, msg) + +Assert that `actual === expected` with an optional description `msg`. + +Aliases: `t.equals()`, `t.isEqual()`, `t.is()`, `t.strictEqual()`, +`t.strictEquals()` + +## t.notEqual(actual, expected, msg) + +Assert that `actual !== expected` with an optional description `msg`. + +Aliases: `t.notEquals()`, `t.notStrictEqual()`, `t.notStrictEquals()`, +`t.isNotEqual()`, `t.isNot()`, `t.not()`, `t.doesNotEqual()`, `t.isInequal()` + +## t.deepEqual(actual, expected, msg) + +Assert that `actual` and `bexpected` have the same structure and nested values using +[node's deepEqual() algorithm](https://github.com/substack/node-deep-equal) +with strict comparisons (`===`) on leaf nodes and an optional description +`msg`. + +Aliases: `t.deepEquals()`, `t.isEquivalent()`, `t.same()` + +## t.notDeepEqual(actual, expected, msg) + +Assert that `actual` and `expected` do not have the same structure and nested values using +[node's deepEqual() algorithm](https://github.com/substack/node-deep-equal) +with strict comparisons (`===`) on leaf nodes and an optional description +`msg`. + +Aliases: `t.notEquivalent()`, `t.notDeeply()`, `t.notSame()`, +`t.isNotDeepEqual()`, `t.isNotDeeply()`, `t.isNotEquivalent()`, +`t.isInequivalent()` + +## t.deepLooseEqual(actual, expected, msg) + +Assert that `actual` and `expected` have the same structure and nested values using +[node's deepEqual() algorithm](https://github.com/substack/node-deep-equal) +with loose comparisons (`==`) on leaf nodes and an optional description `msg`. + +Aliases: `t.looseEqual()`, `t.looseEquals()` + +## t.notDeepLooseEqual(actual, expected, msg) + +Assert that `actual` and `expected` do not have the same structure and nested values using +[node's deepEqual() algorithm](https://github.com/substack/node-deep-equal) +with loose comparisons (`==`) on leaf nodes and an optional description `msg`. + +Aliases: `t.notLooseEqual()`, `t.notLooseEquals()` + +## t.throws(fn, expected, msg) + +Assert that the function call `fn()` throws an exception. `expected`, if present, must be a `RegExp` or `Function`. + +## t.doesNotThrow(fn, expected, msg) + +Assert that the function call `fn()` does not throw an exception. + +## t.test(name, cb) + +Create a subtest with a new test handle `st` from `cb(st)` inside the current +test `t`. `cb(st)` will only fire when `t` finishes. Additional tests queued up +after `t` will not be run until all subtests finish. + +## var htest = test.createHarness() + +Create a new test harness instance, which is a function like `test()`, but with +a new pending stack and test state. + +By default the TAP output goes to `console.log()`. You can pipe the output to +someplace else if you `htest.createStream().pipe()` to a destination stream on +the first tick. + +## test.only(name, cb) + +Like `test(name, cb)` except if you use `.only` this is the only test case +that will run for the entire process, all other test cases using tape will +be ignored + +## var stream = test.createStream(opts) + +Create a stream of output, bypassing the default output stream that writes +messages to `console.log()`. By default `stream` will be a text stream of TAP +output, but you can get an object stream instead by setting `opts.objectMode` to +`true`. + +### tap stream reporter + +You can create your own custom test reporter using this `createStream()` api: + +``` js +var test = require('tape'); +var path = require('path'); + +test.createStream().pipe(process.stdout); + +process.argv.slice(2).forEach(function (file) { + require(path.resolve(file)); +}); +``` + +You could substitute `process.stdout` for whatever other output stream you want, +like a network connection or a file. + +Pass in test files to run as arguments: + +``` +$ node tap.js test/x.js test/y.js +TAP version 13 +# (anonymous) +not ok 1 should be equal + --- + operator: equal + expected: "boop" + actual: "beep" + ... +# (anonymous) +ok 2 should be equal +ok 3 (unnamed assert) +# wheee +ok 4 (unnamed assert) + +1..4 +# tests 4 +# pass 3 +# fail 1 +``` + +### object stream reporter + +Here's how you can render an object stream instead of TAP: + +``` js +var test = require('tape'); +var path = require('path'); + +test.createStream({ objectMode: true }).on('data', function (row) { + console.log(JSON.stringify(row)) +}); + +process.argv.slice(2).forEach(function (file) { + require(path.resolve(file)); +}); +``` + +The output for this runner is: + +``` +$ node object.js test/x.js test/y.js +{"type":"test","name":"(anonymous)","id":0} +{"id":0,"ok":false,"name":"should be equal","operator":"equal","actual":"beep","expected":"boop","error":{},"test":0,"type":"assert"} +{"type":"end","test":0} +{"type":"test","name":"(anonymous)","id":1} +{"id":0,"ok":true,"name":"should be equal","operator":"equal","actual":2,"expected":2,"test":1,"type":"assert"} +{"id":1,"ok":true,"name":"(unnamed assert)","operator":"ok","actual":true,"expected":true,"test":1,"type":"assert"} +{"type":"end","test":1} +{"type":"test","name":"wheee","id":2} +{"id":0,"ok":true,"name":"(unnamed assert)","operator":"ok","actual":true,"expected":true,"test":2,"type":"assert"} +{"type":"end","test":2} +``` + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install tape +``` + +# license + +MIT diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/add-subtest-async.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/add-subtest-async.js new file mode 100755 index 0000000..74b4d8a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/add-subtest-async.js @@ -0,0 +1,11 @@ +var test = require('../') + +test('parent', function (t) { + t.pass('parent'); + setTimeout(function () { + t.test('child', function (t) { + t.pass('child'); + t.end(); + }); + }, 100) +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/array.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/array.js new file mode 100755 index 0000000..2d49863 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/array.js @@ -0,0 +1,68 @@ +var falafel = require('falafel'); +var tape = require('../'); +var tap = require('tap'); + +tap.test('array test', function (tt) { + tt.plan(1); + + var test = tape.createHarness(); + var tc = tap.createConsumer(); + + var rows = []; + tc.on('data', function (r) { rows.push(r) }); + tc.on('end', function () { + var rs = rows.map(function (r) { + if (r && typeof r === 'object') { + return { id : r.id, ok : r.ok, name : r.name.trim() }; + } + else return r; + }); + tt.same(rs, [ + 'TAP version 13', + 'array', + { id: 1, ok: true, name: 'should be equivalent' }, + { id: 2, ok: true, name: 'should be equivalent' }, + { id: 3, ok: true, name: 'should be equivalent' }, + { id: 4, ok: true, name: 'should be equivalent' }, + { id: 5, ok: true, name: 'should be equivalent' }, + 'tests 5', + 'pass 5', + 'ok' + ]); + }); + + test.createStream().pipe(tc); + + test('array', function (t) { + t.plan(5); + + var src = '(' + function () { + var xs = [ 1, 2, [ 3, 4 ] ]; + var ys = [ 5, 6 ]; + g([ xs, ys ]); + } + ')()'; + + var output = falafel(src, function (node) { + if (node.type === 'ArrayExpression') { + node.update('fn(' + node.source() + ')'); + } + }); + + var arrays = [ + [ 3, 4 ], + [ 1, 2, [ 3, 4 ] ], + [ 5, 6 ], + [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], + ]; + + Function(['fn','g'], output)( + function (xs) { + t.same(arrays.shift(), xs); + return xs; + }, + function (xs) { + t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); + } + ); + }); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/bound.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/bound.js new file mode 100755 index 0000000..d398195 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/bound.js @@ -0,0 +1,10 @@ +var test = require('../'); + +test('bind works', function (t) { + t.plan(2); + var equal = t.equal; + var deepEqual = t.deepEqual; + equal(3, 3); + deepEqual([4], [4]); + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/browser/asserts.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/browser/asserts.js new file mode 100755 index 0000000..a1b24f6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/browser/asserts.js @@ -0,0 +1,9 @@ +var test = require('../../'); + +test(function (t) { + t.plan(4); + t.ok(true); + t.equal(3, 1+2); + t.deepEqual([1,2,[3,4]], [1,2,[3,4]]); + t.notDeepEqual([1,2,[3,4,5]], [1,2,[3,4]]); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/child_ordering.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/child_ordering.js new file mode 100755 index 0000000..12efafe --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/child_ordering.js @@ -0,0 +1,54 @@ +var test = require('../'); + +var childRan = false; + +test('parent', function(t) { + t.test('child', function(t) { + childRan = true; + t.pass('child ran'); + t.end(); + }); + t.end(); +}); + +test('uncle', function(t) { + t.ok(childRan, 'Child should run before next top-level test'); + t.end(); +}); + +var grandParentRan = false; +var parentRan = false; +var grandChildRan = false; +test('grandparent', function(t) { + t.ok(!grandParentRan, 'grand parent ran twice'); + grandParentRan = true; + t.test('parent', function(t) { + t.ok(!parentRan, 'parent ran twice'); + parentRan = true; + t.test('grandchild', function(t) { + t.ok(!grandChildRan, 'grand child ran twice'); + grandChildRan = true; + t.pass('grand child ran'); + t.end(); + }); + t.pass('parent ran'); + t.end(); + }); + t.test('other parent', function(t) { + t.ok(parentRan, 'first parent runs before second parent'); + t.ok(grandChildRan, 'grandchild runs before second parent'); + t.end(); + }); + t.pass('grandparent ran'); + t.end(); +}); + +test('second grandparent', function(t) { + t.ok(grandParentRan, 'grandparent ran'); + t.ok(parentRan, 'parent ran'); + t.ok(grandChildRan, 'grandchild ran'); + t.pass('other grandparent ran'); + t.end(); +}); + +// vim: set softtabstop=4 shiftwidth=4: diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/circular-things.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/circular-things.js new file mode 100755 index 0000000..1a0368d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/circular-things.js @@ -0,0 +1,43 @@ +var tape = require('../'); +var tap = require('tap'); + +tap.test('circular test', function (assert) { + var test = tape.createHarness({ exit : false }); + var tc = tap.createConsumer(); + + var rows = []; + tc.on('data', function (r) { rows.push(r) }); + tc.on('end', function () { + // console.log("rs", rows) + + // console.log("deepEqual?") + + assert.same(rows, [ + "TAP version 13" + , "circular" + , { id: 1 + , ok: false + , name: " should be equal" + , operator: "equal" + , expected: "{}" + , actual: '{ circular: [Circular] }' + } + , "tests 1" + , "pass 0" + , "fail 1" + ]) + assert.end() + }) + + // tt.equal(10, 10) + // tt.end() + + test.createStream().pipe(tc); + + test("circular", function (t) { + t.plan(1) + var circular = {} + circular.circular = circular + t.equal(circular, {}) + }) +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/deep.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/deep.js new file mode 100755 index 0000000..02f3681 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/deep.js @@ -0,0 +1,9 @@ +var test = require('../'); + +test('deep strict equal', function (t) { + t.notDeepEqual( + [ { a: '3' } ], + [ { a: 3 } ] + ); + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/double_end.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/double_end.js new file mode 100755 index 0000000..c405d45 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/double_end.js @@ -0,0 +1,27 @@ +var test = require('tap').test; +var concat = require('concat-stream'); +var spawn = require('child_process').spawn; + +test(function (t) { + t.plan(2); + var ps = spawn(process.execPath, [ __dirname + '/double_end/double.js' ]); + ps.on('exit', function (code) { + t.equal(code, 1); + }); + ps.stdout.pipe(concat(function (body) { + t.equal(body.toString('utf8'), [ + 'TAP version 13', + '# double end', + 'ok 1 should be equal', + 'not ok 2 .end() called twice', + ' ---', + ' operator: fail', + ' ...', + '', + '1..2', + '# tests 2', + '# pass 1', + '# fail 1', + ].join('\n') + '\n\n'); + })); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/double_end/double.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/double_end/double.js new file mode 100755 index 0000000..4473482 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/double_end/double.js @@ -0,0 +1,9 @@ +var test = require('../../'); + +test('double end', function (t) { + t.equal(1 + 1, 2); + t.end(); + setTimeout(function () { + t.end(); + }, 5); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/end-as-callback.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/end-as-callback.js new file mode 100755 index 0000000..6d24a0c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/end-as-callback.js @@ -0,0 +1,66 @@ +var tap = require("tap"); +var tape = require("../"); + +tap.test("tape assert.end as callback", function (tt) { + var test = tape.createHarness({ exit: false }) + var tc = tap.createConsumer() + + var rows = [] + tc.on("data", function (r) { rows.push(r) }) + tc.on("end", function () { + var rs = rows.map(function (r) { + return r && typeof r === "object" ? + { id: r.id, ok: r.ok, name: r.name.trim() } : + r + }) + + tt.deepEqual(rs, [ + "TAP version 13", + "do a task and write", + { id: 1, ok: true, name: "null" }, + { id: 2, ok: true, name: "should be equal" }, + { id: 3, ok: true, name: "null" }, + "do a task and write fail", + { id: 4, ok: true, name: "null" }, + { id: 5, ok: true, name: "should be equal" }, + { id: 6, ok: false, name: "Error: fail" }, + "tests 6", + "pass 5", + "fail 1" + ]) + + tt.end() + }) + + test.createStream().pipe(tc) + + test("do a task and write", function (assert) { + fakeAsyncTask("foo", function (err, value) { + assert.ifError(err) + assert.equal(value, "taskfoo") + + fakeAsyncWrite("bar", assert.end) + }) + }) + + test("do a task and write fail", function (assert) { + fakeAsyncTask("bar", function (err, value) { + assert.ifError(err) + assert.equal(value, "taskbar") + + fakeAsyncWriteFail("baz", assert.end) + }) + }) +}) + +function fakeAsyncTask(name, cb) { + cb(null, "task" + name) +} + +function fakeAsyncWrite(name, cb) { + cb(null) +} + +function fakeAsyncWriteFail(name, cb) { + cb(new Error("fail")) +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit.js new file mode 100755 index 0000000..7f7c5d0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit.js @@ -0,0 +1,142 @@ +var tap = require('tap'); +var spawn = require('child_process').spawn; + +tap.test('exit ok', function (t) { + t.plan(2); + + var tc = tap.createConsumer(); + + var rows = []; + tc.on('data', function (r) { rows.push(r) }); + tc.on('end', function () { + var rs = rows.map(function (r) { + if (r && typeof r === 'object') { + return { id : r.id, ok : r.ok, name : r.name.trim() }; + } + else return r; + }); + t.same(rs, [ + 'TAP version 13', + 'array', + { id: 1, ok: true, name: 'should be equivalent' }, + { id: 2, ok: true, name: 'should be equivalent' }, + { id: 3, ok: true, name: 'should be equivalent' }, + { id: 4, ok: true, name: 'should be equivalent' }, + { id: 5, ok: true, name: 'should be equivalent' }, + 'tests 5', + 'pass 5', + 'ok' + ]); + }); + + var ps = spawn(process.execPath, [ __dirname + '/exit/ok.js' ]); + ps.stdout.pipe(tc); + ps.on('exit', function (code) { + t.equal(code, 0); + }); +}); + +tap.test('exit fail', function (t) { + t.plan(2); + + var tc = tap.createConsumer(); + + var rows = []; + tc.on('data', function (r) { rows.push(r) }); + tc.on('end', function () { + var rs = rows.map(function (r) { + if (r && typeof r === 'object') { + return { id : r.id, ok : r.ok, name : r.name.trim() }; + } + else return r; + }); + t.same(rs, [ + 'TAP version 13', + 'array', + { id: 1, ok: true, name: 'should be equivalent' }, + { id: 2, ok: true, name: 'should be equivalent' }, + { id: 3, ok: true, name: 'should be equivalent' }, + { id: 4, ok: true, name: 'should be equivalent' }, + { id: 5, ok: false, name: 'should be equivalent' }, + 'tests 5', + 'pass 4', + 'fail 1' + ]); + }); + + var ps = spawn(process.execPath, [ __dirname + '/exit/fail.js' ]); + ps.stdout.pipe(tc); + ps.on('exit', function (code) { + t.notEqual(code, 0); + }); +}); + +tap.test('too few exit', function (t) { + t.plan(2); + + var tc = tap.createConsumer(); + + var rows = []; + tc.on('data', function (r) { rows.push(r) }); + tc.on('end', function () { + var rs = rows.map(function (r) { + if (r && typeof r === 'object') { + return { id : r.id, ok : r.ok, name : r.name.trim() }; + } + else return r; + }); + t.same(rs, [ + 'TAP version 13', + 'array', + { id: 1, ok: true, name: 'should be equivalent' }, + { id: 2, ok: true, name: 'should be equivalent' }, + { id: 3, ok: true, name: 'should be equivalent' }, + { id: 4, ok: true, name: 'should be equivalent' }, + { id: 5, ok: true, name: 'should be equivalent' }, + { id: 6, ok: false, name: 'plan != count' }, + 'tests 6', + 'pass 5', + 'fail 1' + ]); + }); + + var ps = spawn(process.execPath, [ __dirname + '/exit/too_few.js' ]); + ps.stdout.pipe(tc); + ps.on('exit', function (code) { + t.notEqual(code, 0); + }); +}); + +tap.test('more planned in a second test', function (t) { + t.plan(2); + + var tc = tap.createConsumer(); + + var rows = []; + tc.on('data', function (r) { rows.push(r) }); + tc.on('end', function () { + var rs = rows.map(function (r) { + if (r && typeof r === 'object') { + return { id : r.id, ok : r.ok, name : r.name.trim() }; + } + else return r; + }); + t.same(rs, [ + 'TAP version 13', + 'first', + { id: 1, ok: true, name: '(unnamed assert)' }, + 'second', + { id: 2, ok: true, name: '(unnamed assert)' }, + { id: 3, ok: false, name: 'plan != count' }, + 'tests 3', + 'pass 2', + 'fail 1' + ]); + }); + + var ps = spawn(process.execPath, [ __dirname + '/exit/second.js' ]); + ps.stdout.pipe(tc); + ps.on('exit', function (code) { + t.notEqual(code, 0); + }); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit/fail.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit/fail.js new file mode 100755 index 0000000..d7fd3ce --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit/fail.js @@ -0,0 +1,35 @@ +var test = require('../../'); +var falafel = require('falafel'); + +test('array', function (t) { + t.plan(5); + + var src = '(' + function () { + var xs = [ 1, 2, [ 3, 4 ] ]; + var ys = [ 5, 6 ]; + g([ xs, ys ]); + } + ')()'; + + var output = falafel(src, function (node) { + if (node.type === 'ArrayExpression') { + node.update('fn(' + node.source() + ')'); + } + }); + + var arrays = [ + [ 3, 4 ], + [ 1, 2, [ 3, 4 ] ], + [ 5, 6 ], + [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], + ]; + + Function(['fn','g'], output)( + function (xs) { + t.same(arrays.shift(), xs); + return xs; + }, + function (xs) { + t.same(xs, [ [ 1, 2, [ 3, 4444 ] ], [ 5, 6 ] ]); + } + ); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit/ok.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit/ok.js new file mode 100755 index 0000000..a02c7b6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit/ok.js @@ -0,0 +1,35 @@ +var falafel = require('falafel'); +var test = require('../../'); + +test('array', function (t) { + t.plan(5); + + var src = '(' + function () { + var xs = [ 1, 2, [ 3, 4 ] ]; + var ys = [ 5, 6 ]; + g([ xs, ys ]); + } + ')()'; + + var output = falafel(src, function (node) { + if (node.type === 'ArrayExpression') { + node.update('fn(' + node.source() + ')'); + } + }); + + var arrays = [ + [ 3, 4 ], + [ 1, 2, [ 3, 4 ] ], + [ 5, 6 ], + [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], + ]; + + Function(['fn','g'], output)( + function (xs) { + t.same(arrays.shift(), xs); + return xs; + }, + function (xs) { + t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); + } + ); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit/second.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit/second.js new file mode 100755 index 0000000..8a206bb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit/second.js @@ -0,0 +1,11 @@ +var test = require('../../'); + +test('first', function (t) { + t.plan(1); + t.ok(true); +}); + +test('second', function (t) { + t.plan(2); + t.ok(true); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit/too_few.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit/too_few.js new file mode 100755 index 0000000..8e60ce5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/exit/too_few.js @@ -0,0 +1,35 @@ +var falafel = require('falafel'); +var test = require('../../'); + +test('array', function (t) { + t.plan(6); + + var src = '(' + function () { + var xs = [ 1, 2, [ 3, 4 ] ]; + var ys = [ 5, 6 ]; + g([ xs, ys ]); + } + ')()'; + + var output = falafel(src, function (node) { + if (node.type === 'ArrayExpression') { + node.update('fn(' + node.source() + ')'); + } + }); + + var arrays = [ + [ 3, 4 ], + [ 1, 2, [ 3, 4 ] ], + [ 5, 6 ], + [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], + ]; + + Function(['fn','g'], output)( + function (xs) { + t.same(arrays.shift(), xs); + return xs; + }, + function (xs) { + t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); + } + ); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/fail.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/fail.js new file mode 100755 index 0000000..d56045a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/fail.js @@ -0,0 +1,68 @@ +var falafel = require('falafel'); +var tape = require('../'); +var tap = require('tap'); + +tap.test('array test', function (tt) { + tt.plan(1); + + var test = tape.createHarness({ exit : false }); + var tc = tap.createConsumer(); + + var rows = []; + tc.on('data', function (r) { rows.push(r) }); + tc.on('end', function () { + var rs = rows.map(function (r) { + if (r && typeof r === 'object') { + return { id : r.id, ok : r.ok, name : r.name.trim() }; + } + else return r; + }); + tt.same(rs, [ + 'TAP version 13', + 'array', + { id: 1, ok: true, name: 'should be equivalent' }, + { id: 2, ok: true, name: 'should be equivalent' }, + { id: 3, ok: true, name: 'should be equivalent' }, + { id: 4, ok: true, name: 'should be equivalent' }, + { id: 5, ok: false, name: 'should be equivalent' }, + 'tests 5', + 'pass 4', + 'fail 1' + ]); + }); + + test.createStream().pipe(tc); + + test('array', function (t) { + t.plan(5); + + var src = '(' + function () { + var xs = [ 1, 2, [ 3, 4 ] ]; + var ys = [ 5, 6 ]; + g([ xs, ys ]); + } + ')()'; + + var output = falafel(src, function (node) { + if (node.type === 'ArrayExpression') { + node.update('fn(' + node.source() + ')'); + } + }); + + var arrays = [ + [ 3, 4 ], + [ 1, 2, [ 3, 4 ] ], + [ 5, 6 ], + [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], + ]; + + Function(['fn','g'], output)( + function (xs) { + t.same(arrays.shift(), xs); + return xs; + }, + function (xs) { + t.same(xs, [ [ 1, 2, [ 3, 4444 ] ], [ 5, 6 ] ]); + } + ); + }); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/many.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/many.js new file mode 100755 index 0000000..10556e5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/many.js @@ -0,0 +1,8 @@ +var test = require('../'); + +test('many tests', function (t) { + t.plan(100); + for (var i = 0; i < 100; i++) { + setTimeout(function () { t.pass() }, Math.random() * 50); + } +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/max_listeners.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/max_listeners.js new file mode 100755 index 0000000..5edfb15 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/max_listeners.js @@ -0,0 +1,7 @@ +var spawn = require('child_process').spawn; +var ps = spawn(process.execPath, [ __dirname + '/max_listeners/source.js' ]); +ps.stdout.pipe(process.stdout, { end : false }); + +ps.stderr.on('data', function (buf) { + console.log('not ok ' + buf); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/max_listeners/source.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/max_listeners/source.js new file mode 100755 index 0000000..839a327 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/max_listeners/source.js @@ -0,0 +1,5 @@ +var test = require('../../'); + +for (var i = 0; i < 11; i ++) { + test(function (t) { t.end() }); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/nested-async-plan-noend.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/nested-async-plan-noend.js new file mode 100755 index 0000000..6f8cfdd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/nested-async-plan-noend.js @@ -0,0 +1,36 @@ +var test = require('../'); + +test('Harness async test support', function(t) { + t.plan(3); + + t.ok(true, 'sync child A'); + + t.test('sync child B', function(tt) { + tt.plan(2); + + setTimeout(function(){ + tt.test('async grandchild A', function(ttt) { + ttt.plan(1); + ttt.ok(true); + }); + }, 50); + + setTimeout(function() { + tt.test('async grandchild B', function(ttt) { + ttt.plan(1); + ttt.ok(true); + }); + }, 100); + }); + + setTimeout(function() { + t.test('async child', function(tt) { + tt.plan(2); + tt.ok(true, 'sync grandchild in async child A'); + tt.test('sync grandchild in async child B', function(ttt) { + ttt.plan(1); + ttt.ok(true); + }); + }); + }, 200); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/nested-sync-noplan-noend.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/nested-sync-noplan-noend.js new file mode 100755 index 0000000..a206c50 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/nested-sync-noplan-noend.js @@ -0,0 +1,50 @@ +var tape = require('../'); +var tap = require('tap'); + +tap.test('nested sync test without plan or end', function (tt) { + tt.plan(1); + + var test = tape.createHarness(); + var tc = tap.createConsumer(); + + var rows = []; + tc.on('data', function (r) { rows.push(r) }); + tc.on('end', function () { + var rs = rows.map(function (r) { + if (r && typeof r === 'object') { + return { id : r.id, ok : r.ok, name : r.name.trim() }; + } + else return r; + }); + var expected = [ + 'TAP version 13', + 'nested without plan or end', + 'first', + { id: 1, ok: true, name: '(unnamed assert)' }, + 'second', + { id: 2, ok: true, name: '(unnamed assert)' }, + 'tests 2', + 'pass 2', + 'ok' + ] + tt.same(rs, expected); + }); + + test.createStream().pipe(tc); + + test('nested without plan or end', function(t) { + t.test('first', function(q) { + setTimeout(function first() { + q.ok(true); + q.end() + }, 10); + }); + t.test('second', function(q) { + setTimeout(function second() { + q.ok(true); + q.end() + }, 10); + }); + }); + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/nested.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/nested.js new file mode 100755 index 0000000..673465d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/nested.js @@ -0,0 +1,89 @@ +var falafel = require('falafel'); +var tape = require('../'); +var tap = require('tap'); + +tap.test('array test', function (tt) { + tt.plan(1); + + var test = tape.createHarness(); + var tc = tap.createConsumer(); + + var rows = []; + tc.on('data', function (r) { rows.push(r) }); + tc.on('end', function () { + var rs = rows.map(function (r) { + if (r && typeof r === 'object') { + return { id : r.id, ok : r.ok, name : r.name.trim() }; + } + else return r; + }); + tt.same(rs, [ + 'TAP version 13', + 'nested array test', + { id: 1, ok: true, name: 'should be equivalent' }, + { id: 2, ok: true, name: 'should be equivalent' }, + { id: 3, ok: true, name: 'should be equivalent' }, + { id: 4, ok: true, name: 'should be equivalent' }, + { id: 5, ok: true, name: 'should be equivalent' }, + 'inside test', + { id: 6, ok: true, name: '(unnamed assert)' }, + { id: 7, ok: true, name: '(unnamed assert)' }, + 'another', + { id: 8, ok: true, name: '(unnamed assert)' }, + 'tests 8', + 'pass 8', + 'ok' + ]); + }); + + test.createStream().pipe(tc); + + test('nested array test', function (t) { + t.plan(6); + + var src = '(' + function () { + var xs = [ 1, 2, [ 3, 4 ] ]; + var ys = [ 5, 6 ]; + g([ xs, ys ]); + } + ')()'; + + var output = falafel(src, function (node) { + if (node.type === 'ArrayExpression') { + node.update('fn(' + node.source() + ')'); + } + }); + + t.test('inside test', function (q) { + q.plan(2); + q.ok(true); + + setTimeout(function () { + q.ok(true); + }, 100); + }); + + var arrays = [ + [ 3, 4 ], + [ 1, 2, [ 3, 4 ] ], + [ 5, 6 ], + [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], + ]; + + Function(['fn','g'], output)( + function (xs) { + t.same(arrays.shift(), xs); + return xs; + }, + function (xs) { + t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); + } + ); + }); + + test('another', function (t) { + t.plan(1); + setTimeout(function () { + t.ok(true); + }, 50); + }); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/nested2.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/nested2.js new file mode 100755 index 0000000..58ae8f3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/nested2.js @@ -0,0 +1,19 @@ +var test = require('../'); + +test(function(t) { + var i = 0 + t.test('setup', function(t) { + process.nextTick(function() { + t.equal(i, 0, 'called once') + i++ + t.end() + }) + }) + + + t.test('teardown', function(t) { + t.end() + }) + + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/no_callback.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/no_callback.js new file mode 100755 index 0000000..760ff26 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/no_callback.js @@ -0,0 +1,3 @@ +var test = require('../'); + +test('No callback.'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/only.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/only.js new file mode 100755 index 0000000..9e6bc26 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/only.js @@ -0,0 +1,53 @@ +var tap = require('tap'); +var tape = require('../'); + +tap.test('tape only test', function (tt) { + var test = tape.createHarness({ exit: false }); + var tc = tap.createConsumer(); + var ran = []; + + var rows = [] + tc.on('data', function (r) { rows.push(r) }) + tc.on('end', function () { + var rs = rows.map(function (r) { + if (r && typeof r === 'object') { + return { id: r.id, ok: r.ok, name: r.name.trim() }; + } + else { + return r; + } + }) + + tt.deepEqual(rs, [ + 'TAP version 13', + 'run success', + { id: 1, ok: true, name: 'assert name'}, + 'tests 1', + 'pass 1', + 'ok' + ]) + tt.deepEqual(ran, [ 3 ]); + + tt.end() + }) + + test.createStream().pipe(tc) + + test("never run fail", function (t) { + ran.push(1); + t.equal(true, false) + t.end() + }) + + test("never run success", function (t) { + ran.push(2); + t.equal(true, true) + t.end() + }) + + test.only("run success", function (t) { + ran.push(3); + t.ok(true, "assert name") + t.end() + }) +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/only2.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/only2.js new file mode 100755 index 0000000..fcf4f43 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/only2.js @@ -0,0 +1,9 @@ +var test = require('../'); + +test('only2 test 1', function (t) { + t.end(); +}); + +test.only('only2 test 2', function (t) { + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/only3.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/only3.js new file mode 100755 index 0000000..b192a4e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/only3.js @@ -0,0 +1,15 @@ +var test = require('../'); + +test('only3 test 1', function (t) { + t.fail('not 1'); + t.end(); +}); + +test.only('only3 test 2', function (t) { + t.end(); +}); + +test('only3 test 3', function (t) { + t.fail('not 3'); + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/order.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/order.js new file mode 100755 index 0000000..02aaa05 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/order.js @@ -0,0 +1,17 @@ +var test = require('../'); +var current = 0; + +test(function (t) { + t.equal(current++, 0); + t.end(); +}); +test(function (t) { + t.plan(1); + setTimeout(function () { + t.equal(current++, 1); + }, 100); +}); +test(function (t) { + t.equal(current++, 2); + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/plan_optional.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/plan_optional.js new file mode 100755 index 0000000..a092eab --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/plan_optional.js @@ -0,0 +1,15 @@ +var test = require('../'); + +test('plan should be optional', function (t) { + t.pass('no plan here'); + t.end(); +}); + +test('no plan async', function (t) { + setTimeout(function() { + t.pass('ok'); + t.end(); + }, 100); +}); + +// vim: set softtabstop=4 shiftwidth=4: diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/skip.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/skip.js new file mode 100755 index 0000000..216b600 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/skip.js @@ -0,0 +1,46 @@ +var test = require('../'); +var ran = 0; + +test('do not skip this', { skip: false }, function(t) { + t.pass('this should run'); + ran ++; + t.end(); +}); + +test('skip this', { skip: true }, function(t) { + t.fail('this should not even run'); + ran++; + t.end(); +}); + +test.skip('skip this too', function(t) { + t.fail('this should not even run'); + ran++; + t.end(); +}); + +test.skip('skip this too', function(t) { + t.fail('this should not even run'); + t.end(); +}); + +test('skip subtest', function(t) { + ran ++; + t.test('do not skip this', { skip: false }, function(t) { + ran ++; + t.pass('this should run'); + t.end(); + }); + t.test('skip this', { skip: true }, function(t) { + t.fail('this should not even run'); + t.end(); + }); + t.end(); +}); + +test('right number of tests ran', function(t) { + t.equal(ran, 3, 'ran the right number of tests'); + t.end(); +}); + +// vim: set softtabstop=4 shiftwidth=4: diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/subcount.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/subcount.js new file mode 100755 index 0000000..3a5df3f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/subcount.js @@ -0,0 +1,14 @@ +var test = require('../'); + +test('parent test', function (t) { + t.plan(2); + t.test('first child', function (t) { + t.plan(1); + t.pass('pass first child'); + }) + + t.test(function (t) { + t.plan(1); + t.pass('pass second child'); + }) +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/subtest_and_async.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/subtest_and_async.js new file mode 100755 index 0000000..719dbf5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/subtest_and_async.js @@ -0,0 +1,23 @@ +var test = require('../'); + +var asyncFunction = function (callback) { + setTimeout(callback, Math.random * 50); +}; + +test('master test', function (t) { + t.test('subtest 1', function (t) { + t.pass('subtest 1 before async call'); + asyncFunction(function () { + t.pass('subtest 1 in async callback'); + t.end(); + }) + }); + + t.test('subtest 2', function (t) { + t.pass('subtest 2 before async call'); + asyncFunction(function () { + t.pass('subtest 2 in async callback'); + t.end(); + }) + }); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/subtest_plan.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/subtest_plan.js new file mode 100755 index 0000000..2b075ae --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/subtest_plan.js @@ -0,0 +1,21 @@ +var test = require('../'); + +test('parent', function (t) { + t.plan(3) + + var firstChildRan = false; + + t.pass('assertion in parent'); + + t.test('first child', function (t) { + t.plan(1); + t.pass('pass first child'); + firstChildRan = true; + }); + + t.test('second child', function (t) { + t.plan(2); + t.ok(firstChildRan, 'first child ran first'); + t.pass('pass second child'); + }); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/throws.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/throws.js new file mode 100755 index 0000000..ec91fb8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/throws.js @@ -0,0 +1,20 @@ +var test = require('../'); + +function fn() { + throw new TypeError('RegExp'); +} + +test('throws', function (t) { + t.throws(fn); + t.end(); +}); + +test('throws (RegExp match)', function (t) { + t.throws(fn, /RegExp/); + t.end(); +}); + +test('throws (Function match)', function (t) { + t.throws(fn, TypeError); + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/timeoutAfter.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/timeoutAfter.js new file mode 100755 index 0000000..bd2a4f1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/timeoutAfter.js @@ -0,0 +1,35 @@ +var tape = require('../'); +var tap = require('tap'); + +tap.test('timeoutAfter test', function (tt) { + tt.plan(1); + + var test = tape.createHarness(); + var tc = tap.createConsumer(); + + var rows = []; + tc.on('data', function (r) { rows.push(r) }); + tc.on('end', function () { + var rs = rows.map(function (r) { + if (r && typeof r === 'object') { + return { id : r.id, ok : r.ok, name : r.name.trim() }; + } + else return r; + }); + tt.same(rs, [ + 'TAP version 13', + 'timeoutAfter', + { id: 1, ok: false, name: 'test timed out after 1ms' }, + 'tests 1', + 'pass 0', + 'fail 1' + ]); + }); + + test.createStream().pipe(tc); + + test('timeoutAfter', function (t) { + t.plan(1); + t.timeoutAfter(1); + }); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/too_many.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/too_many.js new file mode 100755 index 0000000..b5c3881 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/too_many.js @@ -0,0 +1,69 @@ +var falafel = require('falafel'); +var tape = require('../'); +var tap = require('tap'); + +tap.test('array test', function (tt) { + tt.plan(1); + + var test = tape.createHarness({ exit : false }); + var tc = tap.createConsumer(); + + var rows = []; + tc.on('data', function (r) { rows.push(r) }); + tc.on('end', function () { + var rs = rows.map(function (r) { + if (r && typeof r === 'object') { + return { id : r.id, ok : r.ok, name : r.name.trim() }; + } + else return r; + }); + tt.same(rs, [ + 'TAP version 13', + 'array', + { id: 1, ok: true, name: 'should be equivalent' }, + { id: 2, ok: true, name: 'should be equivalent' }, + { id: 3, ok: true, name: 'should be equivalent' }, + { id: 4, ok: true, name: 'should be equivalent' }, + { id: 5, ok: false, name: 'plan != count' }, + { id: 6, ok: true, name: 'should be equivalent' }, + 'tests 6', + 'pass 5', + 'fail 1' + ]); + }); + + test.createStream().pipe(tc); + + test('array', function (t) { + t.plan(3); + + var src = '(' + function () { + var xs = [ 1, 2, [ 3, 4 ] ]; + var ys = [ 5, 6 ]; + g([ xs, ys ]); + } + ')()'; + + var output = falafel(src, function (node) { + if (node.type === 'ArrayExpression') { + node.update('fn(' + node.source() + ')'); + } + }); + + var arrays = [ + [ 3, 4 ], + [ 1, 2, [ 3, 4 ] ], + [ 5, 6 ], + [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], + ]; + + Function(['fn','g'], output)( + function (xs) { + t.same(arrays.shift(), xs); + return xs; + }, + function (xs) { + t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); + } + ); + }); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/undef.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/undef.js new file mode 100755 index 0000000..e856a54 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/node_modules/tape/test/undef.js @@ -0,0 +1,32 @@ +var tape = require('../'); +var tap = require('tap'); +var concat = require('concat-stream'); + +tap.test('array test', function (tt) { + tt.plan(1); + + var test = tape.createHarness(); + test.createStream().pipe(concat(function (body) { + tt.equal( + body.toString('utf8'), + 'TAP version 13\n' + + '# undef\n' + + 'not ok 1 should be equivalent\n' + + ' ---\n' + + ' operator: deepEqual\n' + + ' expected: { beep: undefined }\n' + + ' actual: {}\n' + + ' ...\n' + + '\n' + + '1..1\n' + + '# tests 1\n' + + '# pass 0\n' + + '# fail 1\n' + ); + })); + + test('undef', function (t) { + t.plan(1); + t.deepEqual({}, { beep: undefined }); + }); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/package.json new file mode 100755 index 0000000..9606ad2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/package.json @@ -0,0 +1,51 @@ +{ + "name": "cordova-registry-mapper", + "version": "1.1.13", + "description": "Maps old plugin ids to new plugin names for fetching from npm", + "main": "index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/stevengill/cordova-registry-mapper.git" + }, + "scripts": { + "test": "node tests/test.js" + }, + "keywords": [ + "cordova", + "plugins" + ], + "author": { + "name": "Steve Gill" + }, + "license": "Apache version 2.0", + "dependencies": { + "tape": "^3.5.0" + }, + "gitHead": "f9aedb702a876f1a4d53760bb31a39358e0f261e", + "bugs": { + "url": "https://github.com/stevengill/cordova-registry-mapper/issues" + }, + "homepage": "https://github.com/stevengill/cordova-registry-mapper#readme", + "_id": "cordova-registry-mapper@1.1.13", + "_shasum": "08e74b13833abb4bda4b279a0d447590113c8c28", + "_from": "cordova-registry-mapper@^1.1.8", + "_npmVersion": "2.14.2", + "_nodeVersion": "0.10.36", + "_npmUser": { + "name": "stevegill", + "email": "stevengill97@gmail.com" + }, + "dist": { + "shasum": "08e74b13833abb4bda4b279a0d447590113c8c28", + "tarball": "http://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.13.tgz" + }, + "maintainers": [ + { + "name": "stevegill", + "email": "stevengill97@gmail.com" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.13.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/cordova-registry-mapper/tests/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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-common/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/cordova-common/node_modules/elementtree/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/node_modules/elementtree/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/CHANGES.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/LICENSE.txt b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/Makefile b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/NOTICE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/lib/constants.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/lib/elementpath.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/lib/elementtree.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/lib/errors.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/lib/parser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/lib/parsers/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/lib/parsers/sax.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/lib/sprintf.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/lib/treebuilder.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/lib/utils.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/node_modules/sax/AUTHORS b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/AUTHORS new file mode 100755 index 0000000..26d8659 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/AUTHORS @@ -0,0 +1,9 @@ +# contributors sorted by whether or not they're me. +Isaac Z. Schlueter +Stein Martin Hustad +Mikeal Rogers +Laurie Harper +Jann Horn +Elijah Insua +Henry Rawas +Justin Makeig diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/LICENSE new file mode 100755 index 0000000..05a4010 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/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/cordova-common/node_modules/elementtree/node_modules/sax/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/README.md new file mode 100755 index 0000000..9c63dc4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/README.md @@ -0,0 +1,213 @@ +# sax js + +A sax-style parser for XML and HTML. + +Designed with [node](http://nodejs.org/) in mind, but should work fine in +the browser or other CommonJS implementations. + +## What This Is + +* A very simple tool to parse through an XML string. +* A stepping stone to a streaming HTML parser. +* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML + docs. + +## What This Is (probably) Not + +* An HTML Parser - That's a fine goal, but this isn't it. It's just + XML. +* A DOM Builder - You can use it to build an object model out of XML, + but it doesn't do that out of the box. +* XSLT - No DOM = no querying. +* 100% Compliant with (some other SAX implementation) - Most SAX + implementations are in Java and do a lot more than this does. +* An XML Validator - It does a little validation when in strict mode, but + not much. +* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic + masochism. +* A DTD-aware Thing - Fetching DTDs is a much bigger job. + +## Regarding `Hello, world!').close(); + + // stream usage + // takes the same options as the parser + var saxStream = require("sax").createStream(strict, options) + saxStream.on("error", function (e) { + // unhandled errors will throw, since this is a proper node + // event emitter. + console.error("error!", e) + // clear the error + this._parser.error = null + this._parser.resume() + }) + saxStream.on("opentag", function (node) { + // same object as above + }) + // pipe is supported, and it's readable/writable + // same chunks coming in also go out. + fs.createReadStream("file.xml") + .pipe(saxStream) + .pipe(fs.createReadStream("file-copy.xml")) + + + +## Arguments + +Pass the following arguments to the parser function. All are optional. + +`strict` - Boolean. Whether or not to be a jerk. Default: `false`. + +`opt` - Object bag of settings regarding string formatting. All default to `false`. + +Settings supported: + +* `trim` - Boolean. Whether or not to trim text and comment nodes. +* `normalize` - Boolean. If true, then turn any whitespace into a single + space. +* `lowercasetags` - Boolean. If true, then lowercase tags in loose mode, + rather than uppercasing them. +* `xmlns` - Boolean. If true, then namespaces are supported. + +## Methods + +`write` - Write bytes onto the stream. You don't have to do this all at +once. You can keep writing as much as you want. + +`close` - Close the stream. Once closed, no more data may be written until +it is done processing the buffer, which is signaled by the `end` event. + +`resume` - To gracefully handle errors, assign a listener to the `error` +event. Then, when the error is taken care of, you can call `resume` to +continue parsing. Otherwise, the parser will not continue while in an error +state. + +## Members + +At all times, the parser object will have the following members: + +`line`, `column`, `position` - Indications of the position in the XML +document where the parser currently is looking. + +`startTagPosition` - Indicates the position where the current tag starts. + +`closed` - Boolean indicating whether or not the parser can be written to. +If it's `true`, then wait for the `ready` event to write again. + +`strict` - Boolean indicating whether or not the parser is a jerk. + +`opt` - Any options passed into the constructor. + +`tag` - The current tag being dealt with. + +And a bunch of other stuff that you probably shouldn't touch. + +## Events + +All events emit with a single argument. To listen to an event, assign a +function to `on`. Functions get executed in the this-context of +the parser object. The list of supported events are also in the exported +`EVENTS` array. + +When using the stream interface, assign handlers using the EventEmitter +`on` function in the normal fashion. + +`error` - Indication that something bad happened. The error will be hanging +out on `parser.error`, and must be deleted before parsing can continue. By +listening to this event, you can keep an eye on that kind of stuff. Note: +this happens *much* more in strict mode. Argument: instance of `Error`. + +`text` - Text node. Argument: string of text. + +`doctype` - The ``. Argument: +object with `name` and `body` members. Attributes are not parsed, as +processing instructions have implementation dependent semantics. + +`sgmldeclaration` - Random SGML declarations. Stuff like `` +would trigger this kind of event. This is a weird thing to support, so it +might go away at some point. SAX isn't intended to be used to parse SGML, +after all. + +`opentag` - An opening tag. Argument: object with `name` and `attributes`. +In non-strict mode, tag names are uppercased, unless the `lowercasetags` +option is set. If the `xmlns` option is set, then it will contain +namespace binding information on the `ns` member, and will have a +`local`, `prefix`, and `uri` member. + +`closetag` - A closing tag. In loose mode, tags are auto-closed if their +parent closes. In strict mode, well-formedness is enforced. Note that +self-closing tags will have `closeTag` emitted immediately after `openTag`. +Argument: tag name. + +`attribute` - An attribute node. Argument: object with `name` and `value`, +and also namespace information if the `xmlns` option flag is set. + +`comment` - A comment node. Argument: the string of the comment. + +`opencdata` - The opening tag of a ``) of a `` tags trigger a `"script"` +event, and their contents are not checked for special xml characters. +If you pass `noscript: true`, then this behavior is suppressed. + +## Reporting Problems + +It's best to write a failing test if you find an issue. I will always +accept pull requests with failing tests if they demonstrate intended +behavior, but it is very hard to figure out what issue you're describing +without a test. Writing a test is also the best way for you yourself +to figure out if you really understand the issue you think you have with +sax-js. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/big-not-pretty.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/big-not-pretty.xml new file mode 100755 index 0000000..fb5265d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/big-not-pretty.xml @@ -0,0 +1,8002 @@ + + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + + something blerm a bit down here + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/example.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/example.js new file mode 100755 index 0000000..e7f81e6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/example.js @@ -0,0 +1,41 @@ + +var fs = require("fs"), + sys = require("sys"), + path = require("path"), + xml = fs.cat(path.join(__dirname, "test.xml")), + sax = require("../lib/sax"), + strict = sax.parser(true), + loose = sax.parser(false, {trim:true}), + inspector = function (ev) { return function (data) { + // sys.error(""); + // sys.error(ev+": "+sys.inspect(data)); + // for (var i in data) sys.error(i+ " "+sys.inspect(data[i])); + // sys.error(this.line+":"+this.column); + }}; + +xml.addCallback(function (xml) { + // strict.write(xml); + + sax.EVENTS.forEach(function (ev) { + loose["on"+ev] = inspector(ev); + }); + loose.onend = function () { + // sys.error("end"); + // sys.error(sys.inspect(loose)); + }; + + // do this one char at a time to verify that it works. + // (function () { + // if (xml) { + // loose.write(xml.substr(0,1000)); + // xml = xml.substr(1000); + // process.nextTick(arguments.callee); + // } else loose.close(); + // })(); + + for (var i = 0; i < 1000; i ++) { + loose.write(xml); + loose.close(); + } + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/get-products.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/get-products.js new file mode 100755 index 0000000..9e8d74a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/get-products.js @@ -0,0 +1,58 @@ +// pull out /GeneralSearchResponse/categories/category/items/product tags +// the rest we don't care about. + +var sax = require("../lib/sax.js") +var fs = require("fs") +var path = require("path") +var xmlFile = path.resolve(__dirname, "shopping.xml") +var util = require("util") +var http = require("http") + +fs.readFile(xmlFile, function (er, d) { + http.createServer(function (req, res) { + if (er) throw er + var xmlstr = d.toString("utf8") + + var parser = sax.parser(true) + var products = [] + var product = null + var currentTag = null + + parser.onclosetag = function (tagName) { + if (tagName === "product") { + products.push(product) + currentTag = product = null + return + } + if (currentTag && currentTag.parent) { + var p = currentTag.parent + delete currentTag.parent + currentTag = p + } + } + + parser.onopentag = function (tag) { + if (tag.name !== "product" && !product) return + if (tag.name === "product") { + product = tag + } + tag.parent = currentTag + tag.children = [] + tag.parent && tag.parent.children.push(tag) + currentTag = tag + } + + parser.ontext = function (text) { + if (currentTag) currentTag.children.push(text) + } + + parser.onend = function () { + var out = util.inspect(products, false, 3, true) + res.writeHead(200, {"content-type":"application/json"}) + res.end("{\"ok\":true}") + // res.end(JSON.stringify(products)) + } + + parser.write(xmlstr).end() + }).listen(1337) +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/hello-world.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/hello-world.js new file mode 100755 index 0000000..cbfa518 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/hello-world.js @@ -0,0 +1,4 @@ +require("http").createServer(function (req, res) { + res.writeHead(200, {"content-type":"application/json"}) + res.end(JSON.stringify({ok: true})) +}).listen(1337) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/not-pretty.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/not-pretty.xml new file mode 100755 index 0000000..9592852 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/not-pretty.xml @@ -0,0 +1,8 @@ + + something blerm a bit down here diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/pretty-print.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/pretty-print.js new file mode 100755 index 0000000..cd6aca9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/pretty-print.js @@ -0,0 +1,74 @@ +var sax = require("../lib/sax") + , printer = sax.createStream(false, {lowercasetags:true, trim:true}) + , fs = require("fs") + +function entity (str) { + return str.replace('"', '"') +} + +printer.tabstop = 2 +printer.level = 0 +printer.indent = function () { + print("\n") + for (var i = this.level; i > 0; i --) { + for (var j = this.tabstop; j > 0; j --) { + print(" ") + } + } +} +printer.on("opentag", function (tag) { + this.indent() + this.level ++ + print("<"+tag.name) + for (var i in tag.attributes) { + print(" "+i+"=\""+entity(tag.attributes[i])+"\"") + } + print(">") +}) + +printer.on("text", ontext) +printer.on("doctype", ontext) +function ontext (text) { + this.indent() + print(text) +} + +printer.on("closetag", function (tag) { + this.level -- + this.indent() + print("") +}) + +printer.on("cdata", function (data) { + this.indent() + print("") +}) + +printer.on("comment", function (comment) { + this.indent() + print("") +}) + +printer.on("error", function (error) { + console.error(error) + throw error +}) + +if (!process.argv[2]) { + throw new Error("Please provide an xml file to prettify\n"+ + "TODO: read from stdin or take a file") +} +var xmlfile = require("path").join(process.cwd(), process.argv[2]) +var fstr = fs.createReadStream(xmlfile, { encoding: "utf8" }) + +function print (c) { + if (!process.stdout.write(c)) { + fstr.pause() + } +} + +process.stdout.on("drain", function () { + fstr.resume() +}) + +fstr.pipe(printer) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/shopping.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/shopping.xml new file mode 100755 index 0000000..223c6c6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/shopping.xml @@ -0,0 +1,2 @@ + +sandbox3.1 r31.Kadu4DC.phase357782011.10.06 15:37:23 PSTp2.a121bc2aaf029435dce62011-10-21T18:38:45.982-04:00P0Y0M0DT0H0M0.169S1112You are currently using the SDC API sandbox environment! No clicks to merchant URLs from this response will be paid. Please change the host of your API requests to 'publisher.api.shopping.com' when you have finished development and testinghttp://statTest.dealtime.com/pixel/noscript?PV_EvnTyp=APPV&APPV_APITSP=10%2F21%2F11_06%3A38%3A45_PM&APPV_DSPRQSID=p2.a121bc2aaf029435dce6&APPV_IMGURL=http://img.shopping.com/sc/glb/sdc_logo_106x19.gif&APPV_LI_LNKINID=7000610&APPV_LI_SBMKYW=nikon&APPV_MTCTYP=1000&APPV_PRTID=2002&APPV_BrnID=14804http://www.shopping.com/digital-cameras/productsDigital CamerasDigital CamerasElectronicshttp://www.shopping.com/xCH-electronics-nikon~linkin_id-7000610?oq=nikonCameras and Photographyhttp://www.shopping.com/xCH-cameras_and_photography-nikon~linkin_id-7000610?oq=nikonDigital Camerashttp://www.shopping.com/digital-cameras/nikon/products?oq=nikon&linkin_id=7000610nikonnikonDigital Camerashttp://www.shopping.com/digital-cameras/nikon/products?oq=nikon&linkin_id=7000610Nikon D3100 Digital Camera14.2 Megapixel, SLR Camera, 3 in. LCD Screen, With High Definition Video, Weight: 1 lb.The Nikon D3100 digital SLR camera speaks to the growing ranks of enthusiastic D-SLR users and aspiring photographers by providing an easy-to-use and affordable entrance to the world of Nikon D-SLR’s. The 14.2-megapixel D3100 has powerful features, such as the enhanced Guide Mode that makes it easy to unleash creative potential and capture memories with still images and full HD video. Like having a personal photo tutor at your fingertips, this unique feature provides a simple graphical interface on the camera’s LCD that guides users by suggesting and/or adjusting camera settings to achieve the desired end result images. The D3100 is also the world’s first D-SLR to introduce full time auto focus (AF) in Live View and D-Movie mode to effortlessly achieve the critical focus needed when shooting Full HD 1080p video.http://di1.shopping.com/images/pi/93/bc/04/101677489-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1http://di1.shopping.com/images/pi/93/bc/04/101677489-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1http://di1.shopping.com/images/pi/93/bc/04/101677489-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1http://di1.shopping.com/images/pi/93/bc/04/101677489-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1http://di1.shopping.com/images/pi/93/bc/04/101677489-606x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=194.56http://img.shopping.com/sc/pr/sdc_stars_sm_4.5.gifhttp://www.shopping.com/Nikon-D3100/reviews~linkin_id-7000610429.001360.00http://www.shopping.com/Nikon-D3100/prices~linkin_id-7000610http://www.shopping.com/Nikon-D3100/info~linkin_id-7000610Nikon D3100 Digital SLR Camera with 18-55mm NIKKOR VR LensThe Nikon D3100 Digital SLR Camera is an affordable compact and lightweight photographic power-house. It features the all-purpose 18-55mm VR lens a high-resolution 14.2 MP CMOS sensor along with a feature set that's comprehensive yet easy to navigate - the intuitive onboard learn-as-you grow guide mode allows the photographer to understand what the 3100 can do quickly and easily. Capture beautiful pictures and amazing Full HD 1080p movies with sound and full-time autofocus. Availabilty: In Stock!7185Nikonhttp://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-350x350-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stockFree Shipping with Any Purchase!529.000.00799.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=647&BEFID=7185&aon=%5E1&MerchantID=475674&crawler_id=475674&dealId=-ZW6BMZqz6fbS-aULwga_g%3D%3D&url=http%3A%2F%2Fwww.fumfie.com%2Fproduct%2F343.5%2Fshopping-com%3F&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D3100+Digital+SLR+Camera+with+18-55mm+NIKKOR+VR+Lens&dlprc=529.0&crn=&istrsmrc=1&isathrsl=0&AR=1&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=1&cid=&semid1=&semid2=&IsLps=0&CC=1&SL=1&FS=1&code=&acode=658&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=FumFiehttp://img.shopping.com/cctool/merch_logos/475674.gif866 666 91985604.27http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_fumfie~MRD-475674~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSF343C5Nikon Nikon D3100 14.2MP Digital SLR Camera with 18-55mm f/3.5-5.6 AF-S DX VR, CamerasNikon D3100 14.2MP Digital SLR Camera with 18-55mm f/3.5-5.6 AF-S DX VR7185Nikonhttp://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-385x352-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2in-stock549.000.00549.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=779&BEFID=7185&aon=%5E1&MerchantID=305814&crawler_id=305814&dealId=md1e9lD8vdOu4FHQfJqKng%3D%3D&url=http%3A%2F%2Fwww.electronics-expo.com%2Findex.php%3Fpage%3Ditem%26id%3DNIKD3100%26source%3DSideCar%26scpid%3D8%26scid%3Dscsho318727%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+Nikon+D3100+14.2MP+Digital+SLR+Camera+with+18-55mm+f%2F3.5-5.6+AF-S+DX+VR%2C+Cameras&dlprc=549.0&crn=&istrsmrc=1&isathrsl=0&AR=9&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=9&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=771&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Electronics Expohttp://img.shopping.com/cctool/merch_logos/305814.gif1-888-707-EXPO3713.90http://img.shopping.com/sc/mr/sdc_checks_4.gifhttp://www.shopping.com/xMR-store_electronics_expo~MRD-305814~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSNIKD3100Nikon D3100 14.2-Megapixel Digital SLR Camera With 18-55mm Zoom-Nikkor Lens, BlackSplit-second shutter response captures shots other cameras may have missed Helps eliminate the frustration of shutter delay! 14.2-megapixels for enlargements worth framing and hanging. Takes breathtaking 1080p HD movies. ISO sensitivity from 100-1600 for bright or dimly lit settings. 3.0in. color LCD for beautiful, wide-angle framing and viewing. In-camera image editing lets you retouch with no PC. Automatic scene modes include Child, Sports, Night Portrait and more. Accepts SDHC memory cards. Nikon D3100 14.2-Megapixel Digital SLR Camera With 18-55mm Zoom-Nikkor Lens, Black is one of many Digital SLR Cameras available through Office Depot. Made by Nikon.7185Nikonhttp://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-250x250-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3in-stock549.990.00699.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=698&BEFID=7185&aon=%5E1&MerchantID=467671&crawler_id=467671&dealId=yYuaXnDFtCY7rDUjkY2aaw%3D%3D&url=http%3A%2F%2Flink.mercent.com%2Fredirect.ashx%3Fmr%3AmerchantID%3DOfficeDepot%26mr%3AtrackingCode%3DCEC9669E-6ABC-E011-9F24-0019B9C043EB%26mr%3AtargetUrl%3Dhttp%3A%2F%2Fwww.officedepot.com%2Fa%2Fproducts%2F486292%2FNikon-D3100-142-Megapixel-Digital-SLR%2F%253fcm_mmc%253dMercent-_-Shopping-_-Cameras_and_Camcorders-_-486292&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D3100+14.2-Megapixel+Digital+SLR+Camera+With+18-55mm+Zoom-Nikkor+Lens%2C+Black&dlprc=549.99&crn=&istrsmrc=1&isathrsl=0&AR=10&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=10&cid=&semid1=&semid2=&IsLps=0&CC=1&SL=1&FS=1&code=&acode=690&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Office Depothttp://img.shopping.com/cctool/merch_logos/467671.gif1-800-GO-DEPOT1352.37http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_office_depot_4158555~MRD-467671~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS486292Nikon® D3100™ 14.2MP Digital SLR with 18-55mm LensThe Nikon D3100 DSLR will surprise you with its simplicity and impress you with superb results.7185Nikonhttp://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4in-stock549.996.05549.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=Rl56U7CuiTYsH4MGZ02lxQ%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D903483107%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C2%AE+D3100%E2%84%A2+14.2MP+Digital+SLR+with+18-55mm+Lens&dlprc=549.99&crn=&istrsmrc=0&isathrsl=0&AR=11&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=11&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=496&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RadioShackhttp://img.shopping.com/cctool/merch_logos/332477.gif242.25http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS9614867Nikon D3100 SLR w/Nikon 18-55mm VR & 55-200mm VR Lenses14.2 Megapixels3" LCDLive ViewHD 1080p Video w/ Sound & Autofocus11-point Autofocus3 Frames per Second ShootingISO 100 to 3200 (Expand to 12800-Hi2)Self Cleaning SensorEXPEED 2, Image Processing EngineScene Recognition System7185Nikonhttp://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-345x345-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5in-stock695.000.00695.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&BEFID=7185&aon=%5E1&MerchantID=487342&crawler_id=487342&dealId=huS6xZKDKaKMTMP71eI6DA%3D%3D&url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D32983%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D3100+SLR+w%2FNikon+18-55mm+VR+%26+55-200mm+VR+Lenses&dlprc=695.0&crn=&istrsmrc=0&isathrsl=0&AR=15&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=15&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=379&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RytherCamera.comhttp://img.shopping.com/cctool/merch_logos/487342.gif1-877-644-75930http://img.shopping.com/sc/glb/flag/US.gifUS32983Nikon COOLPIX S203 Digital Camera10 Megapixel, Ultra-Compact Camera, 2.5 in. LCD Screen, 3x Optical Zoom, With Video Capability, Weight: 0.23 lb.With 10.34 mega pixel, electronic VR vibration reduction, 5-level brightness adjustment, 3x optical zoom, and TFT LCD, Nikon Coolpix s203 fulfills all the demands of any photographer. The digital camera has an inbuilt memory of 44MB and an external memory slot made for all kinds of SD (Secure Digital) cards.http://di1.shopping.com/images/pi/c4/ef/1b/95397883-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2http://di1.shopping.com/images/pi/c4/ef/1b/95397883-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2http://di1.shopping.com/images/pi/c4/ef/1b/95397883-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2http://di1.shopping.com/images/pi/c4/ef/1b/95397883-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2http://di1.shopping.com/images/pi/c4/ef/1b/95397883-500x499-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=20139.00139.00http://www.shopping.com/Nikon-Coolpix-S203/prices~linkin_id-7000610http://www.shopping.com/Nikon-Coolpix-S203/info~linkin_id-7000610Nikon Coolpix S203 Digital Camera (Red)With 10.34 mega pixel, electronic VR vibration reduction, 5-level brightness adjustment, 3x optical zoom, and TFT LCD, Nikon Coolpix s203 fulfills all the demands of any photographer. The digital camera has an inbuilt memory of 44MB and an external memory slot made for all kinds of SD (Secure Digital) cards.7185Nikonhttp://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stockFantastic prices with ease & comfort of Amazon.com!139.009.50139.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=566&BEFID=7185&aon=%5E1&MerchantID=301531&crawler_id=1903313&dealId=sBd2JnIEPM-A_lBAM1RZgQ%3D%3D&url=http%3A%2F%2Fwww.amazon.com%2Fdp%2FB002T964IM%2Fref%3Dasc_df_B002T964IM1751618%3Fsmid%3DA22UHVNXG98FAT%26tag%3Ddealtime-ce-mp01feed-20%26linkCode%3Dasn%26creative%3D395105%26creativeASIN%3DB002T964IM&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+Coolpix+S203+Digital+Camera+%28Red%29&dlprc=139.0&crn=&istrsmrc=0&isathrsl=0&AR=63&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=95397883&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=63&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=518&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Amazon Marketplacehttp://img.shopping.com/cctool/merch_logos/301531.gif2132.73http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_amazon_marketplace_9689~MRD-301531~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSB002T964IMNikon S3100 Digital Camera14.5 Megapixel, Compact Camera, 2.7 in. LCD Screen, 5x Optical Zoom, With High Definition Video, Weight: 0.23 lb.This digital camera features a wide-angle optical Zoom-NIKKOR glass lens that allows you to capture anything from landscapes to portraits to action shots. The high-definition movie mode with one-touch recording makes it easy to capture video clips.http://di1.shopping.com/images/pi/66/2d/33/106834268-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3http://di1.shopping.com/images/pi/66/2d/33/106834268-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3http://di1.shopping.com/images/pi/66/2d/33/106834268-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3http://di1.shopping.com/images/pi/66/2d/33/106834268-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3http://di1.shopping.com/images/pi/66/2d/33/106834268-507x387-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=312.00http://img.shopping.com/sc/pr/sdc_stars_sm_2.gifhttp://www.shopping.com/nikon-s3100/reviews~linkin_id-700061099.95134.95http://www.shopping.com/nikon-s3100/prices~linkin_id-7000610http://www.shopping.com/nikon-s3100/info~linkin_id-7000610CoolPix S3100 14 Megapixel Compact Digital Camera- RedNikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - red7185Nikonhttp://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stockGet 30 days FREE SHIPPING w/ ShipVantage119.956.95139.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=UUyGoqV8r0-xrkn-rnGNbg%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJ3Yx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmDAJeU1oyGG0GcBdhGwUGCAVqYF9SO0xSN1sZdmA7dmMdBQAJB24qX1NbQxI6AjA2ME5dVFULPDsGPFcQTTdaLTA6SR0OFlQvPAwMDxYcYlxIVkcoLTcCDA%3D%3D%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=CoolPix+S3100+14+Megapixel+Compact+Digital+Camera-+Red&dlprc=119.95&crn=&istrsmrc=1&isathrsl=0&AR=28&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=28&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=0&code=&acode=583&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Searshttp://img.shopping.com/cctool/merch_logos/485615.gif1-800-349-43588882.85http://img.shopping.com/sc/mr/sdc_checks_3.gifhttp://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS00337013000COOLPIX S3100 PinkNikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - pink7185Nikonhttp://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2in-stockGet 30 days FREE SHIPPING w/ ShipVantage119.956.95139.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=X87AwXlW1dXoMXk4QQDToQ%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJxYx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcUFxDEGsPc3QDEkFZVQ0WFhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=COOLPIX+S3100+Pink&dlprc=119.95&crn=&istrsmrc=1&isathrsl=0&AR=31&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=31&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=0&code=&acode=583&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Searshttp://img.shopping.com/cctool/merch_logos/485615.gif1-800-349-43588882.85http://img.shopping.com/sc/mr/sdc_checks_3.gifhttp://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS00337015000Nikon Coolpix S3100 14.0 MP Digital Camera - SilverNikon Coolpix S3100 14.0 MP Digital Camera - Silver7185Nikonhttp://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-270x270-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3in-stock109.970.00109.97http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=803&BEFID=7185&aon=%5E&MerchantID=475774&crawler_id=475774&dealId=nvFwnpfA4rlA1Dbksdsa0w%3D%3D&url=http%3A%2F%2Fwww.thewiz.com%2Fcatalog%2Fproduct.jsp%3FmodelNo%3DS3100SILVER%26gdftrk%3DgdfV2677_a_7c996_a_7c4049_a_7c26262&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+Coolpix+S3100+14.0+MP+Digital+Camera+-+Silver&dlprc=109.97&crn=&istrsmrc=0&isathrsl=0&AR=33&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=33&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=797&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=TheWiz.comhttp://img.shopping.com/cctool/merch_logos/475774.gif877-542-69880http://img.shopping.com/sc/glb/flag/US.gifUS26262Nikon� COOLPIX� S3100 14MP Digital Camera (Silver)The Nikon COOLPIX S3100 is the easy way to share your life and stay connected.7185Nikonhttp://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4in-stock119.996.05119.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=5GtaN2NeryKwps-Se2l-4g%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D848064082%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C3%AF%C2%BF%C2%BD+COOLPIX%C3%AF%C2%BF%C2%BD+S3100+14MP+Digital+Camera+%28Silver%29&dlprc=119.99&crn=&istrsmrc=0&isathrsl=0&AR=37&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=37&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=509&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RadioShackhttp://img.shopping.com/cctool/merch_logos/332477.gif242.25http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS10101095COOLPIX S3100 YellowNikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - yellow7185Nikonhttp://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5in-stockGet 30 days FREE SHIPPING w/ ShipVantage119.956.95139.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=a43m0RXulX38zCnQjU59jw%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJwYx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcUFxDEGoPc3QDEkFZVQ0WFhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=COOLPIX+S3100+Yellow&dlprc=119.95&crn=&istrsmrc=1&isathrsl=0&AR=38&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=38&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=0&code=&acode=583&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Searshttp://img.shopping.com/cctool/merch_logos/485615.gif1-800-349-43588882.85http://img.shopping.com/sc/mr/sdc_checks_3.gifhttp://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS00337014000Nikon D90 Digital Camera12.3 Megapixel, Point and Shoot Camera, 3 in. LCD Screen, With Video Capability, Weight: 1.36 lb.Untitled Document Nikon D90 SLR Digital Camera With 28-80mm 75-300mm Lens Kit The Nikon D90 SLR Digital Camera, with its 12.3-megapixel DX-format CMOS, 3" High resolution LCD display, Scene Recognition System, Picture Control, Active D-Lighting, and one-button Live View, provides photo enthusiasts with the image quality and performance they need to pursue their own vision while still being intuitive enough for use as an everyday camera.http://di1.shopping.com/images/pi/52/fb/d3/99671132-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4http://di1.shopping.com/images/pi/52/fb/d3/99671132-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4http://di1.shopping.com/images/pi/52/fb/d3/99671132-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4http://di1.shopping.com/images/pi/52/fb/d3/99671132-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4http://di1.shopping.com/images/pi/52/fb/d3/99671132-499x255-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=475.00http://img.shopping.com/sc/pr/sdc_stars_sm_5.gifhttp://www.shopping.com/Nikon-D90-with-18-270mm-Lens/reviews~linkin_id-7000610689.002299.00http://www.shopping.com/Nikon-D90-with-18-270mm-Lens/prices~linkin_id-7000610http://www.shopping.com/Nikon-D90-with-18-270mm-Lens/info~linkin_id-7000610Nikon® D90 12.3MP Digital SLR Camera (Body Only)The Nikon D90 will make you rethink what a digital SLR camera can achieve.7185Nikonhttp://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stock1015.996.051015.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=GU5JJkpUAxe5HujB7fkwAA%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D851830266%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C2%AE+D90+12.3MP+Digital+SLR+Camera+%28Body+Only%29&dlprc=1015.99&crn=&istrsmrc=0&isathrsl=0&AR=14&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=14&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=496&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RadioShackhttp://img.shopping.com/cctool/merch_logos/332477.gif242.25http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS10148659Nikon D90 SLR Digital Camera (Camera Body)The Nikon D90 SLR Digital Camera with its 12.3-megapixel DX-format CCD 3" High resolution LCD display Scene Recognition System Picture Control Active D-Lighting and one-button Live View provides photo enthusiasts with the image quality and performance they need to pursue their own vision while still being intuitive enough for use as an everyday camera. In addition the D90 introduces the D-Movie mode allowing for the first time an interchangeable lens SLR camera that is capable of recording 720p HD movie clips. Availabilty: In Stock7185Nikonhttp://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-350x350-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2in-stockFree Shipping with Any Purchase!689.000.00900.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=647&BEFID=7185&aon=%5E1&MerchantID=475674&crawler_id=475674&dealId=XhURuSC-spBbTIDfo4qfzQ%3D%3D&url=http%3A%2F%2Fwww.fumfie.com%2Fproduct%2F169.5%2Fshopping-com%3F&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+SLR+Digital+Camera+%28Camera+Body%29&dlprc=689.0&crn=&istrsmrc=1&isathrsl=0&AR=16&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=16&cid=&semid1=&semid2=&IsLps=0&CC=1&SL=1&FS=1&code=&acode=658&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=FumFiehttp://img.shopping.com/cctool/merch_logos/475674.gif866 666 91985604.27http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_fumfie~MRD-475674~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSF169C5Nikon D90 SLR w/Nikon 18-105mm VR & 55-200mm VR Lenses12.3 MegapixelDX Format CMOS Sensor3" VGA LCD DisplayLive ViewSelf Cleaning SensorD-Movie ModeHigh Sensitivity (ISO 3200)4.5 fps BurstIn-Camera Image Editing7185Nikonhttp://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3in-stock1189.000.001189.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&BEFID=7185&aon=%5E1&MerchantID=487342&crawler_id=487342&dealId=o0Px_XLWDbrxAYRy3rCmyQ%3D%3D&url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D30619%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+SLR+w%2FNikon+18-105mm+VR+%26+55-200mm+VR+Lenses&dlprc=1189.0&crn=&istrsmrc=0&isathrsl=0&AR=20&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=20&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=379&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RytherCamera.comhttp://img.shopping.com/cctool/merch_logos/487342.gif1-877-644-75930http://img.shopping.com/sc/glb/flag/US.gifUS30619Nikon D90 12.3 Megapixel Digital SLR Camera (Body Only)Fusing 12.3 megapixel image quality and a cinematic 24fps D-Movie Mode, the Nikon D90 exceeds the demands of passionate photographers. Coupled with Nikon's EXPEED image processing technologies and NIKKOR optics, breathtaking image fidelity is assured. Combined with fast 0.15ms power-up and split-second 65ms shooting lag, dramatic action and decisive moments are captured easily. Effective 4-frequency, ultrasonic sensor cleaning frees image degrading dust particles from the sensor's optical low pass filter.7185Nikonhttp://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4in-stockFREE FEDEX 2-3 DAY DELIVERY899.950.00899.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=269&BEFID=7185&aon=%5E&MerchantID=9296&crawler_id=811558&dealId=4HgbWJSJ8ssgIf8B0MXIwA%3D%3D&url=http%3A%2F%2Fwww.pcnation.com%2Foptics-gallery%2Fdetails.asp%3Faffid%3D305%26item%3D2N145P&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+12.3+Megapixel+Digital+SLR+Camera+%28Body+Only%29&dlprc=899.95&crn=&istrsmrc=1&isathrsl=0&AR=21&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=21&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=257&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=PCNationhttp://img.shopping.com/cctool/merch_logos/9296.gif800-470-707916224.43http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_pcnation_9689~MRD-9296~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS2N145PNikon D90 12.3MP Digital SLR Camera (Body Only)Fusing 12.3-megapixel image quality inherited from the award-winning D300 with groundbreaking features, the D90's breathtaking, low-noise image quality is further advanced with EXPEED image processing. Split-second shutter response and continuous shooting at up to 4.5 frames-per-second provide the power to capture fast action and precise moments perfectly, while Nikon's exclusive Scene Recognition System contributes to faster 11-area autofocus performance, finer white balance detection and more. The D90 delivers the control passionate photographers demand, utilizing comprehensive exposure functions and the intelligence of 3D Color Matrix Metering II. Stunning results come to life on a 3-inch 920,000-dot color LCD monitor, providing accurate image review, Live View composition and brilliant playback of the D90's cinematic-quality 24-fps HD D-Movie mode.7185Nikonhttp://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5in-stockFantastic prices with ease & comfort of Amazon.com!780.000.00780.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=566&BEFID=7185&aon=%5E1&MerchantID=301531&crawler_id=1903313&dealId=UNDa3uMDZXOnvD_7sTILYg%3D%3D&url=http%3A%2F%2Fwww.amazon.com%2Fdp%2FB001ET5U92%2Fref%3Dasc_df_B001ET5U921751618%3Fsmid%3DAHF4SYKP09WBH%26tag%3Ddealtime-ce-mp01feed-20%26linkCode%3Dasn%26creative%3D395105%26creativeASIN%3DB001ET5U92&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+12.3MP+Digital+SLR+Camera+%28Body+Only%29&dlprc=780.0&crn=&istrsmrc=0&isathrsl=0&AR=29&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=29&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=520&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Amazon Marketplacehttp://img.shopping.com/cctool/merch_logos/301531.gif2132.73http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_amazon_marketplace_9689~MRD-301531~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSB001ET5U92Nikon D90 Digital Camera with 18-105mm lens12.9 Megapixel, SLR Camera, 3 in. LCD Screen, 5.8x Optical Zoom, With Video Capability, Weight: 2.3 lb.Its 12.3 megapixel DX-format CMOS image sensor and EXPEED image processing system offer outstanding image quality across a wide ISO light sensitivity range. Live View mode lets you compose and shoot via the high-resolution 3-inch LCD monitor, and an advanced Scene Recognition System and autofocus performance help capture images with astounding accuracy. Movies can be shot in Motion JPEG format using the D-Movie function. The camera’s large image sensor ensures exceptional movie image quality and you can create dramatic effects by shooting with a wide range of interchangeable NIKKOR lenses, from wide-angle to macro to fisheye, or by adjusting the lens aperture and experimenting with depth-of-field. The D90 – designed to fuel your passion for photography.http://di1.shopping.com/images/pi/57/6a/4f/70621646-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5http://di1.shopping.com/images/pi/57/6a/4f/70621646-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5http://di1.shopping.com/images/pi/57/6a/4f/70621646-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5http://di1.shopping.com/images/pi/57/6a/4f/70621646-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5http://di1.shopping.com/images/pi/57/6a/4f/70621646-490x489-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5324.81http://img.shopping.com/sc/pr/sdc_stars_sm_5.gifhttp://www.shopping.com/Nikon-D90-with-18-105mm-lens/reviews~linkin_id-7000610849.951599.95http://www.shopping.com/Nikon-D90-with-18-105mm-lens/prices~linkin_id-7000610http://www.shopping.com/Nikon-D90-with-18-105mm-lens/info~linkin_id-7000610Nikon D90 18-105mm VR LensThe Nikon D90 SLR Digital Camera with its 12.3-megapixel DX-format CMOS 3" High resolution LCD display Scene Recognition System Picture Control Active D-Lighting and one-button Live View prov7185Nikonhttp://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-260x260-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stock849.950.00849.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=419&BEFID=7185&aon=%5E1&MerchantID=9390&crawler_id=1905054&dealId=3o5e1VghgJPfhLvT1JFKTA%3D%3D&url=http%3A%2F%2Fwww.ajrichard.com%2FNikon-D90-18-105mm-VR-Lens%2Fp-292%3Frefid%3DShopping%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+18-105mm+VR+Lens&dlprc=849.95&crn=&istrsmrc=0&isathrsl=0&AR=2&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=2&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=425&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=AJRichardhttp://img.shopping.com/cctool/merch_logos/9390.gif1-888-871-125631244.48http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_ajrichard~MRD-9390~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS292Nikon D90 SLR w/Nikon 18-105mm VR Lens12.3 MegapixelDX Format CMOS Sensor3" VGA LCD DisplayLive ViewSelf Cleaning SensorD-Movie ModeHigh Sensitivity (ISO 3200)4.5 fps BurstIn-Camera Image Editing7185Nikonhttp://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2in-stock909.000.00909.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&BEFID=7185&aon=%5E1&MerchantID=487342&crawler_id=487342&dealId=_lYWj_jbwfsSkfcwUcDuww%3D%3D&url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D30971%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+SLR+w%2FNikon+18-105mm+VR+Lens&dlprc=909.0&crn=&istrsmrc=0&isathrsl=0&AR=3&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=3&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=379&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RytherCamera.comhttp://img.shopping.com/cctool/merch_logos/487342.gif1-877-644-75930http://img.shopping.com/sc/glb/flag/US.gifUS3097125448/D90 12.3 Megapixel Digital Camera 18-105mm Zoom Lens w/ 3" Screen - BlackNikon D90 - Digital camera - SLR - 12.3 Mpix - Nikon AF-S DX 18-105mm lens - optical zoom: 5.8 x - supported memory: SD, SDHC7185Nikonhttp://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3in-stockGet 30 days FREE SHIPPING w/ ShipVantage1199.008.201199.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=1KCclCGuWvty2XKU9skadg%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBRtFXpzYx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcVlhCGGkPc3QDEkFZVQ0WFhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=25448%2FD90+12.3+Megapixel+Digital+Camera+18-105mm+Zoom+Lens+w%2F+3%22+Screen+-+Black&dlprc=1199.0&crn=&istrsmrc=1&isathrsl=0&AR=4&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=4&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=586&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Searshttp://img.shopping.com/cctool/merch_logos/485615.gif1-800-349-43588882.85http://img.shopping.com/sc/mr/sdc_checks_3.gifhttp://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS00353197000Nikon® D90 12.3MP Digital SLR with 18-105mm LensThe Nikon D90 will make you rethink what a digital SLR camera can achieve.7185Nikonhttp://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4in-stock1350.996.051350.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=3-VOSfVV5Jo7HlA4kJtanA%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D982673361%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C2%AE+D90+12.3MP+Digital+SLR+with+18-105mm+Lens&dlprc=1350.99&crn=&istrsmrc=0&isathrsl=0&AR=5&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=5&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=496&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RadioShackhttp://img.shopping.com/cctool/merch_logos/332477.gif242.25http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS11148905Nikon D90 Kit 12.3-megapixel Digital SLR with 18-105mm VR LensPhotographers, take your passion further!Now is the time for new creativity, and to rethink what a digital SLR camera can achieve. It's time for the D90, a camera with everything you would expect from Nikon's next-generation D-SLRs, and some unexpected surprises, as well. The stunning image quality is inherited from the D300, Nikon's DX-format flagship. The D90 also has Nikon's unmatched ergonomics and high performance, and now takes high-quality movies with beautifully cinematic results. The world of photography has changed, and with the D90 in your hands, it's time to make your own rules.AF-S DX NIKKOR 18-105mm f/3.5-5.6G ED VR LensWide-ratio 5.8x zoom Compact, versatile and ideal for a broad range of shooting situations, ranging from interiors and landscapes to beautiful portraits� a perfect everyday zoom. Nikon VR (Vibration Reduction) image stabilization Vibration Reduction is engineered specifically for each VR NIKKOR lens and enables handheld shooting at up to 3 shutter speeds slower than would7185Nikonhttp://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-300x232-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5in-stockShipping Included!1050.000.001199.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=135&BEFID=7185&aon=%5E1&MerchantID=313162&crawler_id=313162&dealId=kQnB6rS4AjN5dx5h2_631g%3D%3D&url=http%3A%2F%2Fonecall.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1pZSxNoWHFwLx8GTAICa2ZeH1sPXTZLNzRpAh1HR0BxPQEGCBJNMhFHUElsFCFCVkVTTHAcBggEHQ4aHXNpGERGH3RQODsbAgdechJtbBt8fx8JAwhtZFAzJj1oGgIWCxRlNyFOUV9UUGIxBgo0T0IyTSYqJ0RWHw4QPCIBAAQXRGMDICg6TllZVBhh%26nAID%3D13736960&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+Kit+12.3-megapixel+Digital+SLR+with+18-105mm+VR+Lens&dlprc=1050.0&crn=&istrsmrc=1&isathrsl=0&AR=6&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=6&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=1&code=&acode=143&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=OneCallhttp://img.shopping.com/cctool/merch_logos/313162.gif1.800.398.07661804.44http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_onecall_9689~MRD-313162~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS92826Price rangehttp://www.shopping.com/digital-cameras/nikon/products?oq=nikon&linkin_id=7000610$24 - $4012http://www.shopping.com/digital-cameras/nikon/products?minPrice=24&maxPrice=4012&linkin_id=7000610$4012 - $7999http://www.shopping.com/digital-cameras/nikon/products?minPrice=4012&maxPrice=7999&linkin_id=7000610Brandhttp://www.shopping.com/digital-cameras/nikon/products~all-9688-brand~MS-1?oq=nikon&linkin_id=7000610Nikonhttp://www.shopping.com/digital-cameras/nikon+brand-nikon/products~linkin_id-7000610Cranehttp://www.shopping.com/digital-cameras/nikon+9688-brand-crane/products~linkin_id-7000610Ikelitehttp://www.shopping.com/digital-cameras/nikon+ikelite/products~linkin_id-7000610Bowerhttp://www.shopping.com/digital-cameras/nikon+bower/products~linkin_id-7000610FUJIFILMhttp://www.shopping.com/digital-cameras/nikon+brand-fuji/products~linkin_id-7000610Storehttp://www.shopping.com/digital-cameras/nikon/products~all-store~MS-1?oq=nikon&linkin_id=7000610Amazon Marketplacehttp://www.shopping.com/digital-cameras/nikon+store-amazon-marketplace-9689/products~linkin_id-7000610Amazonhttp://www.shopping.com/digital-cameras/nikon+store-amazon/products~linkin_id-7000610Adoramahttp://www.shopping.com/digital-cameras/nikon+store-adorama/products~linkin_id-7000610J&R Music and Computer Worldhttp://www.shopping.com/digital-cameras/nikon+store-j-r-music-and-computer-world/products~linkin_id-7000610RytherCamera.comhttp://www.shopping.com/digital-cameras/nikon+store-rythercamera-com/products~linkin_id-7000610Resolutionhttp://www.shopping.com/digital-cameras/nikon/products~all-21885-resolution~MS-1?oq=nikon&linkin_id=7000610Under 4 Megapixelhttp://www.shopping.com/digital-cameras/nikon+under-4-megapixel/products~linkin_id-7000610At least 5 Megapixelhttp://www.shopping.com/digital-cameras/nikon+5-megapixel-digital-cameras/products~linkin_id-7000610At least 6 Megapixelhttp://www.shopping.com/digital-cameras/nikon+6-megapixel-digital-cameras/products~linkin_id-7000610At least 7 Megapixelhttp://www.shopping.com/digital-cameras/nikon+7-megapixel-digital-cameras/products~linkin_id-7000610At least 8 Megapixelhttp://www.shopping.com/digital-cameras/nikon+8-megapixel-digital-cameras/products~linkin_id-7000610Featureshttp://www.shopping.com/digital-cameras/nikon/products~all-32804-features~MS-1?oq=nikon&linkin_id=7000610Shockproofhttp://www.shopping.com/digital-cameras/nikon+32804-features-shockproof/products~linkin_id-7000610Waterproofhttp://www.shopping.com/digital-cameras/nikon+32804-features-waterproof/products~linkin_id-7000610Freezeproofhttp://www.shopping.com/digital-cameras/nikon+32804-features-freezeproof/products~linkin_id-7000610Dust proofhttp://www.shopping.com/digital-cameras/nikon+32804-features-dust-proof/products~linkin_id-7000610Image Stabilizationhttp://www.shopping.com/digital-cameras/nikon+32804-features-image-stabilization/products~linkin_id-7000610hybriddigital camerag1sonycameracanonnikonkodak digital camerakodaksony cybershotkodak easyshare digital cameranikon coolpixolympuspink digital cameracanon powershot \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/strict.dtd b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/strict.dtd new file mode 100755 index 0000000..b274559 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/strict.dtd @@ -0,0 +1,870 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +%HTMLlat1; + + +%HTMLsymbol; + + +%HTMLspecial; + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/switch-bench.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/switch-bench.js new file mode 100755 index 0000000..4d3cf14 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/switch-bench.js @@ -0,0 +1,45 @@ +#!/usr/local/bin/node-bench + +var Promise = require("events").Promise; + +var xml = require("posix").cat("test.xml").wait(), + path = require("path"), + sax = require("../lib/sax"), + saxT = require("../lib/sax-trampoline"), + + parser = sax.parser(false, {trim:true}), + parserT = saxT.parser(false, {trim:true}), + + sys = require("sys"); + + +var count = exports.stepsPerLap = 500, + l = xml.length, + runs = 0; +exports.countPerLap = 1000; +exports.compare = { + "switch" : function () { + // sys.debug("switch runs: "+runs++); + // for (var x = 0; x < l; x += 1000) { + // parser.write(xml.substr(x, 1000)) + // } + // for (var i = 0; i < count; i ++) { + parser.write(xml); + parser.close(); + // } + // done(); + }, + trampoline : function () { + // sys.debug("trampoline runs: "+runs++); + // for (var x = 0; x < l; x += 1000) { + // parserT.write(xml.substr(x, 1000)) + // } + // for (var i = 0; i < count; i ++) { + parserT.write(xml); + parserT.close(); + // } + // done(); + }, +}; + +sys.debug("rock and roll..."); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/test.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/test.html new file mode 100755 index 0000000..61f8f1a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/test.html @@ -0,0 +1,15 @@ + + + + + testing the parser + + + +

    hello + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/node_modules/sax/examples/test.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/lib/sax.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/parser-position.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/script.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/self-closing-child-strict.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/self-closing-child.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/self-closing-tag.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/stray-ending.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/trailing-non-whitespace.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/unquoted.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/xmlns-issue-41.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/xmlns-rebinding.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/xmlns-strict.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/xmlns-unbound.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-prefix.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-redefine.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/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/cordova-common/node_modules/elementtree/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/package.json new file mode 100755 index 0000000..cbeffca --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/package.json @@ -0,0 +1,75 @@ +{ + "author": { + "name": "Rackspace US, Inc." + }, + "contributors": [ + { + "name": "Paul Querna", + "email": "paul.querna@rackspace.com" + }, + { + "name": "Tomaz Muraus", + "email": "tomaz.muraus@rackspace.com" + } + ], + "name": "elementtree", + "description": "XML Serialization and Parsing module based on Python's ElementTree.", + "version": "0.1.6", + "keywords": [ + "xml", + "sax", + "parser", + "seralization", + "elementtree" + ], + "homepage": "https://github.com/racker/node-elementtree", + "repository": { + "type": "git", + "url": "git://github.com/racker/node-elementtree.git" + }, + "main": "lib/elementtree.js", + "directories": { + "lib": "lib" + }, + "scripts": { + "test": "make test" + }, + "engines": { + "node": ">= 0.4.0" + }, + "dependencies": { + "sax": "0.3.5" + }, + "devDependencies": { + "whiskey": "0.8.x" + }, + "licenses": [ + { + "type": "Apache", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + ], + "bugs": { + "url": "https://github.com/racker/node-elementtree/issues" + }, + "_id": "elementtree@0.1.6", + "dist": { + "shasum": "2ac4c46ea30516c8c4cbdb5e3ac7418e592de20c", + "tarball": "http://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz" + }, + "_from": "elementtree@^0.1.6", + "_npmVersion": "1.3.24", + "_npmUser": { + "name": "rphillips", + "email": "ryan@trolocsis.com" + }, + "maintainers": [ + { + "name": "rphillips", + "email": "ryan@trolocsis.com" + } + ], + "_shasum": "2ac4c46ea30516c8c4cbdb5e3ac7418e592de20c", + "_resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/elementtree/tests/data/xml1.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/tests/data/xml2.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/elementtree/tests/test-simple.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/glob/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/glob/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/glob/common.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/glob/glob.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/glob/node_modules/inflight/.eslintrc b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/.eslintrc new file mode 100755 index 0000000..b7a1550 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/.eslintrc @@ -0,0 +1,17 @@ +{ + "env" : { + "node" : true + }, + "rules" : { + "semi": [2, "never"], + "strict": 0, + "quotes": [1, "single", "avoid-escape"], + "no-use-before-define": 0, + "curly": 0, + "no-underscore-dangle": 0, + "no-lonely-if": 1, + "no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}], + "no-mixed-requires": 0, + "space-infix-ops": 0 + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/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/cordova-common/node_modules/glob/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/cordova-common/node_modules/glob/node_modules/inflight/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/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/cordova-common/node_modules/glob/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/cordova-common/node_modules/glob/node_modules/inflight/inflight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/inflight.js new file mode 100755 index 0000000..8bc96cb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/inflight.js @@ -0,0 +1,44 @@ +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) + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + 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/cordova-common/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/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/cordova-common/node_modules/glob/node_modules/inflight/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/cordova-common/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/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/cordova-common/node_modules/glob/node_modules/inflight/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/cordova-common/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json new file mode 100755 index 0000000..9165c6e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json @@ -0,0 +1,52 @@ +{ + "name": "wrappy", + "version": "1.0.1", + "description": "Callback wrapping utility", + "main": "wrappy.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^0.4.12" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/wrappy" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "homepage": "https://github.com/npm/wrappy", + "gitHead": "006a8cbac6b99988315834c207896eed71fd069a", + "_id": "wrappy@1.0.1", + "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "_from": "wrappy@1", + "_npmVersion": "2.0.0", + "_nodeVersion": "0.10.31", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + }, + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js new file mode 100755 index 0000000..5ed0fcd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js @@ -0,0 +1,51 @@ +var test = require('tap').test +var wrappy = require('../wrappy.js') + +test('basic', function (t) { + function onceifier (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } + } + onceifier.iAmOnce = {} + var once = wrappy(onceifier) + t.equal(once.iAmOnce, onceifier.iAmOnce) + + var called = 0 + function boo () { + t.equal(called, 0) + called++ + } + // has some rando property + boo.iAmBoo = true + + var onlyPrintOnce = once(boo) + + onlyPrintOnce() // prints 'boo' + onlyPrintOnce() // does nothing + t.equal(called, 1) + + // random property is retained! + t.equal(onlyPrintOnce.iAmBoo, true) + + var logs = [] + var logwrap = wrappy(function (msg, cb) { + logs.push(msg + ' wrapping cb') + return function () { + logs.push(msg + ' before cb') + var ret = cb.apply(this, arguments) + logs.push(msg + ' after cb') + } + }) + + var c = logwrap('foo', function () { + t.same(logs, [ 'foo wrapping cb', 'foo before cb' ]) + }) + c() + t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ]) + + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/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/cordova-common/node_modules/glob/node_modules/inflight/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/cordova-common/node_modules/glob/node_modules/inflight/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/package.json new file mode 100755 index 0000000..38417ea --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/package.json @@ -0,0 +1,61 @@ +{ + "name": "inflight", + "version": "1.0.4", + "description": "Add callbacks to requests in flight to avoid async duplication", + "main": "inflight.js", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + }, + "devDependencies": { + "tap": "^0.4.10" + }, + "scripts": { + "test": "tap test.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inflight" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/inflight/issues" + }, + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC", + "gitHead": "c7b5531d572a867064d4a1da9e013e8910b7d1ba", + "_id": "inflight@1.0.4", + "_shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", + "_from": "inflight@^1.0.4", + "_npmVersion": "2.1.3", + "_nodeVersion": "0.10.32", + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "dist": { + "shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", + "tarball": "http://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/test.js new file mode 100755 index 0000000..2bb75b3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inflight/test.js @@ -0,0 +1,97 @@ +var test = require('tap').test +var inf = require('./inflight.js') + + +function req (key, cb) { + cb = inf(key, cb) + if (cb) setTimeout(function () { + cb(key) + cb(key) + }) + return cb +} + +test('basic', function (t) { + var calleda = false + var a = req('key', function (k) { + t.notOk(calleda) + calleda = true + t.equal(k, 'key') + if (calledb) t.end() + }) + t.ok(a, 'first returned cb function') + + var calledb = false + var b = req('key', function (k) { + t.notOk(calledb) + calledb = true + t.equal(k, 'key') + if (calleda) t.end() + }) + + t.notOk(b, 'second should get falsey inflight response') +}) + +test('timing', function (t) { + var expect = [ + 'method one', + 'start one', + 'end one', + 'two', + 'tick', + 'three' + ] + var i = 0 + + function log (m) { + t.equal(m, expect[i], m + ' === ' + expect[i]) + ++i + if (i === expect.length) + t.end() + } + + function method (name, cb) { + log('method ' + name) + process.nextTick(cb) + } + + var one = inf('foo', function () { + log('start one') + var three = inf('foo', function () { + log('three') + }) + if (three) method('three', three) + log('end one') + }) + + method('one', one) + + var two = inf('foo', function () { + log('two') + }) + if (two) method('one', two) + + process.nextTick(log.bind(null, 'tick')) +}) + +test('parameters', function (t) { + t.plan(8) + + var a = inf('key', function (first, second, third) { + t.equal(first, 1) + t.equal(second, 2) + t.equal(third, 3) + }) + t.ok(a, 'first returned cb function') + + var b = inf('key', function (first, second, third) { + t.equal(first, 1) + t.equal(second, 2) + t.equal(third, 3) + }) + t.notOk(b, 'second should get falsey inflight response') + + setTimeout(function () { + a(1, 2, 3) + }) +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inherits/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/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/cordova-common/node_modules/glob/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/cordova-common/node_modules/glob/node_modules/inherits/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/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/cordova-common/node_modules/glob/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/cordova-common/node_modules/glob/node_modules/inherits/inherits.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inherits/inherits.js new file mode 100755 index 0000000..29f5e24 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inherits/inherits.js @@ -0,0 +1 @@ +module.exports = require('util').inherits diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inherits/inherits_browser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/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/cordova-common/node_modules/glob/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/cordova-common/node_modules/glob/node_modules/inherits/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inherits/package.json new file mode 100755 index 0000000..2368284 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inherits/package.json @@ -0,0 +1,50 @@ +{ + "name": "inherits", + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "version": "2.0.1", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "main": "./inherits.js", + "browser": "./inherits_browser.js", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inherits" + }, + "license": "ISC", + "scripts": { + "test": "node test" + }, + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, + "_id": "inherits@2.0.1", + "dist": { + "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "_from": "inherits@2", + "_npmVersion": "1.3.8", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "readme": "ERROR: No README data found!", + "homepage": "https://github.com/isaacs/inherits" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inherits/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inherits/test.js new file mode 100755 index 0000000..fc53012 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/inherits/test.js @@ -0,0 +1,25 @@ +var inherits = require('./inherits.js') +var assert = require('assert') + +function test(c) { + assert(c.constructor === Child) + assert(c.constructor.super_ === Parent) + assert(Object.getPrototypeOf(c) === Child.prototype) + assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) + assert(c instanceof Child) + assert(c instanceof Parent) +} + +function Child() { + Parent.call(this) + test(this) +} + +function Parent() {} + +inherits(Child, Parent) + +var c = new Child +test(c) + +console.log('ok') diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/LICENSE new file mode 100755 index 0000000..19129e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/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/cordova-common/node_modules/glob/node_modules/minimatch/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/README.md new file mode 100755 index 0000000..d458bc2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/README.md @@ -0,0 +1,216 @@ +# minimatch + +A minimal matching utility. + +[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) + + +This is the matching library used internally by npm. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```javascript +var minimatch = require("minimatch") + +minimatch("bar.foo", "*.foo") // true! +minimatch("bar.foo", "*.bar") // false! +minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` + +## Minimatch Class + +Create a minimatch object by instanting the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require("minimatch").Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +* `pattern` The original pattern the minimatch object represents. +* `options` The options supplied to the constructor. +* `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +* `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +* `negate` True if the pattern is negated. +* `comment` True if the pattern is a comment. +* `empty` True if the pattern is `""`. + +### Methods + +* `makeRe` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +* `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +* `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. + +All other methods are internal, and will be called as necessary. + +## Functions + +The top-level exported function has a `cache` property, which is an LRU +cache set to store 100 items. So, calling these methods repeatedly +with the same pattern and options will use the same Minimatch object, +saving the cost of parsing it multiple times. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, "*.js", { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) +``` + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between minimatch and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +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.1, 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. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.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. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/minimatch.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/minimatch.js new file mode 100755 index 0000000..ec4c05c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/minimatch.js @@ -0,0 +1,912 @@ +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = { sep: '/' } +try { + path = require('path') +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = require('brace-expansion') + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new Error('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var plType + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + plType = stateChar + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + re += ')' + var pl = patternListStack.pop() + plType = pl.type + // negation is (?:(?!js)[^/]*) + // The others are (?:) + switch (plType) { + case '!': + negativeLists.push(pl) + re += ')[^/]*?)' + pl.reEnd = re.length + break + case '?': + case '+': + case '*': + re += plType + break + case '@': break // the default anyway + } + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + var regExp = new RegExp('^' + re + '$', flags) + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore new file mode 100755 index 0000000..353546a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore @@ -0,0 +1,3 @@ +test +.gitignore +.travis.yml diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/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/cordova-common/node_modules/glob/node_modules/minimatch/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/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js new file mode 100755 index 0000000..60ecfc7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js @@ -0,0 +1,8 @@ +var expand = require('./'); + +console.log(expand('http://any.org/archive{1996..1999}/vol{1..4}/part{a,b,c}.html')); +console.log(expand('http://www.numericals.com/file{1..100..10}.txt')); +console.log(expand('http://www.letters.com/file{a..z..2}.txt')); +console.log(expand('mkdir /usr/local/src/bash/{old,new,dist,bugs}')); +console.log(expand('chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}')); + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js new file mode 100755 index 0000000..a23104e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js @@ -0,0 +1,191 @@ +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 []; + + 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/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore new file mode 100755 index 0000000..fd4f2b0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore @@ -0,0 +1,2 @@ +node_modules +.DS_Store diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml new file mode 100755 index 0000000..6e5919d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md new file mode 100755 index 0000000..2cdc8e4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/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/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile new file mode 100755 index 0000000..fa5da71 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile @@ -0,0 +1,6 @@ + +test: + @node_modules/.bin/tape test/*.js + +.PHONY: test + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md new file mode 100755 index 0000000..2aff0eb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md @@ -0,0 +1,80 @@ +# balanced-match + +Match balanced string pairs, like `{` and `}` or `` and ``. + +[![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')); +``` + +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' } +``` + +## 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', '']`. + +## 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/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js new file mode 100755 index 0000000..c02ad34 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js @@ -0,0 +1,5 @@ +var balanced = require('./'); + +console.log(balanced('{', '}', 'pre{in{nested}}post')); +console.log(balanced('{', '}', 'pre{first}between{second}post')); + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js new file mode 100755 index 0000000..d165ae8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js @@ -0,0 +1,38 @@ +module.exports = balanced; +function balanced(a, b, str) { + var bal = 0; + var m = {}; + var ended = false; + + for (var i = 0; i < str.length; i++) { + if (a == str.substr(i, a.length)) { + if (!('start' in m)) m.start = i; + bal++; + } + else if (b == str.substr(i, b.length) && 'start' in m) { + ended = true; + bal--; + if (!bal) { + m.end = i; + m.pre = str.substr(0, m.start); + m.body = (m.end - m.start > 1) + ? str.substring(m.start + a.length, m.end) + : ''; + m.post = str.slice(m.end + b.length); + return m; + } + } + } + + // if we opened more than we closed, find the one we closed + if (bal && ended) { + var start = m.start + a.length; + m = balanced(a, b, str.substr(start)); + if (m) { + m.start += start; + m.end += start; + m.pre = str.slice(0, start) + m.pre; + } + return m; + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json new file mode 100755 index 0000000..23ecd26 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json @@ -0,0 +1,73 @@ +{ + "name": "balanced-match", + "description": "Match balanced character pairs, like \"{\" and \"}\"", + "version": "0.2.1", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/balanced-match.git" + }, + "homepage": "https://github.com/juliangruber/balanced-match", + "main": "index.js", + "scripts": { + "test": "make test" + }, + "dependencies": {}, + "devDependencies": { + "tape": "~1.1.1" + }, + "keywords": [ + "match", + "regexp", + "test", + "balanced", + "parse" + ], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "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" + ] + }, + "gitHead": "d743dd31d7376e0fcf99392a4be7227f2e99bf5d", + "bugs": { + "url": "https://github.com/juliangruber/balanced-match/issues" + }, + "_id": "balanced-match@0.2.1", + "_shasum": "7bc658b4bed61eee424ad74f75f5c3e2c4df3cc7", + "_from": "balanced-match@^0.2.0", + "_npmVersion": "2.14.7", + "_nodeVersion": "4.2.1", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "dist": { + "shasum": "7bc658b4bed61eee424ad74f75f5c3e2c4df3cc7", + "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.2.1.tgz" + }, + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js new file mode 100755 index 0000000..36bfd39 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js @@ -0,0 +1,56 @@ +var test = require('tape'); +var balanced = require('..'); + +test('balanced', function(t) { + t.deepEqual(balanced('{', '}', 'pre{in{nest}}post'), { + start: 3, + end: 12, + pre: 'pre', + body: 'in{nest}', + post: 'post' + }); + t.deepEqual(balanced('{', '}', '{{{{{{{{{in}post'), { + start: 8, + end: 11, + pre: '{{{{{{{{', + body: 'in', + post: 'post' + }); + t.deepEqual(balanced('{', '}', 'pre{body{in}post'), { + start: 8, + end: 11, + pre: 'pre{body', + body: 'in', + post: 'post' + }); + t.deepEqual(balanced('{', '}', 'pre}{in{nest}}post'), { + start: 4, + end: 13, + pre: 'pre}', + body: 'in{nest}', + post: 'post' + }); + t.deepEqual(balanced('{', '}', 'pre{body}between{body2}post'), { + start: 3, + end: 8, + pre: 'pre', + body: 'body', + post: 'between{body2}post' + }); + t.notOk(balanced('{', '}', 'nope'), 'should be notOk'); + t.deepEqual(balanced('', '', 'preinnestpost'), { + start: 3, + end: 19, + pre: 'pre', + body: 'innest', + post: 'post' + }); + t.deepEqual(balanced('', '', 'preinnestpost'), { + start: 7, + end: 23, + pre: 'pre', + body: 'innest', + post: 'post' + }); + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/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/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/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/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/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/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/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/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/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/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/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/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/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/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/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/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/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/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/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/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json new file mode 100755 index 0000000..b516138 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json @@ -0,0 +1,83 @@ +{ + "name": "concat-map", + "description": "concatenative mapdashery", + "version": "0.0.1", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-concat-map.git" + }, + "main": "index.js", + "keywords": [ + "concat", + "concatMap", + "map", + "functional", + "higher-order" + ], + "directories": { + "example": "example", + "test": "test" + }, + "scripts": { + "test": "tape test/*.js" + }, + "devDependencies": { + "tape": "~2.4.0" + }, + "license": "MIT", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "ie": [ + 6, + 7, + 8, + 9 + ], + "ff": [ + 3.5, + 10, + 15 + ], + "chrome": [ + 10, + 22 + ], + "safari": [ + 5.1 + ], + "opera": [ + 12 + ] + } + }, + "bugs": { + "url": "https://github.com/substack/node-concat-map/issues" + }, + "homepage": "https://github.com/substack/node-concat-map", + "_id": "concat-map@0.0.1", + "dist": { + "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "tarball": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + }, + "_from": "concat-map@0.0.1", + "_npmVersion": "1.3.21", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/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/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/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/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json new file mode 100755 index 0000000..1ca4097 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json @@ -0,0 +1,75 @@ +{ + "name": "brace-expansion", + "description": "Brace expansion as known from sh/bash", + "version": "1.1.1", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "main": "index.js", + "scripts": { + "test": "tape test/*.js", + "gentest": "bash test/generate.sh" + }, + "dependencies": { + "balanced-match": "^0.2.0", + "concat-map": "0.0.1" + }, + "devDependencies": { + "tape": "^3.0.3" + }, + "keywords": [], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "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" + ] + }, + "gitHead": "f50da498166d76ea570cf3b30179f01f0f119612", + "bugs": { + "url": "https://github.com/juliangruber/brace-expansion/issues" + }, + "_id": "brace-expansion@1.1.1", + "_shasum": "da5fb78aef4c44c9e4acf525064fb3208ebab045", + "_from": "brace-expansion@^1.0.0", + "_npmVersion": "2.6.1", + "_nodeVersion": "0.10.36", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + } + ], + "dist": { + "shasum": "da5fb78aef4c44c9e4acf525064fb3208ebab045", + "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/package.json new file mode 100755 index 0000000..9a907dd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch/package.json @@ -0,0 +1,60 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "3.0.0", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "posttest": "standard minimatch.js test/*.js", + "test": "tap test/*.js" + }, + "engines": { + "node": "*" + }, + "dependencies": { + "brace-expansion": "^1.0.0" + }, + "devDependencies": { + "standard": "^3.7.2", + "tap": "^1.2.0" + }, + "license": "ISC", + "files": [ + "minimatch.js" + ], + "gitHead": "270dbea567f0af6918cb18103e98c612aa717a20", + "bugs": { + "url": "https://github.com/isaacs/minimatch/issues" + }, + "homepage": "https://github.com/isaacs/minimatch#readme", + "_id": "minimatch@3.0.0", + "_shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83", + "_from": "minimatch@2 || 3", + "_npmVersion": "3.3.2", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83", + "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/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/cordova-common/node_modules/glob/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/cordova-common/node_modules/glob/node_modules/once/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/README.md new file mode 100755 index 0000000..a2981ea --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/README.md @@ -0,0 +1,51 @@ +# 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')) + }) +} +``` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/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/cordova-common/node_modules/glob/node_modules/once/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/cordova-common/node_modules/glob/node_modules/once/node_modules/wrappy/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/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/cordova-common/node_modules/glob/node_modules/once/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/cordova-common/node_modules/glob/node_modules/once/node_modules/wrappy/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/node_modules/wrappy/package.json new file mode 100755 index 0000000..9165c6e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/node_modules/wrappy/package.json @@ -0,0 +1,52 @@ +{ + "name": "wrappy", + "version": "1.0.1", + "description": "Callback wrapping utility", + "main": "wrappy.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^0.4.12" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/wrappy" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "homepage": "https://github.com/npm/wrappy", + "gitHead": "006a8cbac6b99988315834c207896eed71fd069a", + "_id": "wrappy@1.0.1", + "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "_from": "wrappy@1", + "_npmVersion": "2.0.0", + "_nodeVersion": "0.10.31", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + }, + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js new file mode 100755 index 0000000..5ed0fcd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js @@ -0,0 +1,51 @@ +var test = require('tap').test +var wrappy = require('../wrappy.js') + +test('basic', function (t) { + function onceifier (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } + } + onceifier.iAmOnce = {} + var once = wrappy(onceifier) + t.equal(once.iAmOnce, onceifier.iAmOnce) + + var called = 0 + function boo () { + t.equal(called, 0) + called++ + } + // has some rando property + boo.iAmBoo = true + + var onlyPrintOnce = once(boo) + + onlyPrintOnce() // prints 'boo' + onlyPrintOnce() // does nothing + t.equal(called, 1) + + // random property is retained! + t.equal(onlyPrintOnce.iAmBoo, true) + + var logs = [] + var logwrap = wrappy(function (msg, cb) { + logs.push(msg + ' wrapping cb') + return function () { + logs.push(msg + ' before cb') + var ret = cb.apply(this, arguments) + logs.push(msg + ' after cb') + } + }) + + var c = logwrap('foo', function () { + t.same(logs, [ 'foo wrapping cb', 'foo before cb' ]) + }) + c() + t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ]) + + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/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/cordova-common/node_modules/glob/node_modules/once/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/cordova-common/node_modules/glob/node_modules/once/once.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/once.js new file mode 100755 index 0000000..2e1e721 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/once.js @@ -0,0 +1,21 @@ +var wrappy = require('wrappy') +module.exports = wrappy(once) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(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 +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/package.json new file mode 100755 index 0000000..4eef2f4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/package.json @@ -0,0 +1,60 @@ +{ + "name": "once", + "version": "1.3.2", + "description": "Run a function exactly one time", + "main": "once.js", + "directories": { + "test": "test" + }, + "dependencies": { + "wrappy": "1" + }, + "devDependencies": { + "tap": "~0.3.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once.git" + }, + "keywords": [ + "once", + "function", + "one", + "single" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "gitHead": "e35eed5a7867574e2bf2260a1ba23970958b22f2", + "bugs": { + "url": "https://github.com/isaacs/once/issues" + }, + "homepage": "https://github.com/isaacs/once#readme", + "_id": "once@1.3.2", + "_shasum": "d8feeca93b039ec1dcdee7741c92bdac5e28081b", + "_from": "once@^1.3.0", + "_npmVersion": "2.9.1", + "_nodeVersion": "2.0.0", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "d8feeca93b039ec1dcdee7741c92bdac5e28081b", + "tarball": "http://registry.npmjs.org/once/-/once-1.3.2.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "_resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/test/once.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/test/once.js new file mode 100755 index 0000000..c618360 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/once/test/once.js @@ -0,0 +1,23 @@ +var test = require('tap').test +var once = require('../once.js') + +test('once', function (t) { + var f = 0 + function fn (g) { + t.equal(f, 0) + f ++ + return f + g + this + } + fn.ownProperty = {} + var foo = once(fn) + t.equal(fn.ownProperty, foo.ownProperty) + t.notOk(foo.called) + for (var i = 0; i < 1E3; i++) { + t.same(f, i === 0 ? 0 : 1) + var g = foo.call(1, 1) + t.ok(foo.called) + t.same(g, 3) + t.same(f, 1) + } + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/path-is-absolute/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/path-is-absolute/index.js new file mode 100755 index 0000000..19f103f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/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/joyent/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 = !!device && device.charAt(1) !== ':'; + + // UNC paths are always absolute + return !!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/cordova-common/node_modules/glob/node_modules/path-is-absolute/license b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/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/cordova-common/node_modules/glob/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/cordova-common/node_modules/glob/node_modules/path-is-absolute/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/path-is-absolute/package.json new file mode 100755 index 0000000..100878b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/path-is-absolute/package.json @@ -0,0 +1,70 @@ +{ + "name": "path-is-absolute", + "version": "1.0.0", + "description": "Node.js 0.12 path.isAbsolute() ponyfill", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/sindresorhus/path-is-absolute" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "path", + "paths", + "file", + "dir", + "absolute", + "isabsolute", + "is-absolute", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim", + "is", + "detect", + "check" + ], + "gitHead": "7a76a0c9f2263192beedbe0a820e4d0baee5b7a1", + "bugs": { + "url": "https://github.com/sindresorhus/path-is-absolute/issues" + }, + "homepage": "https://github.com/sindresorhus/path-is-absolute", + "_id": "path-is-absolute@1.0.0", + "_shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", + "_from": "path-is-absolute@^1.0.0", + "_npmVersion": "2.5.1", + "_nodeVersion": "0.12.0", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "dist": { + "shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", + "tarball": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/path-is-absolute/readme.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/path-is-absolute/readme.md new file mode 100755 index 0000000..cdf94f4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/node_modules/path-is-absolute/readme.md @@ -0,0 +1,51 @@ +# 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 + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## Install + +``` +$ npm install --save path-is-absolute +``` + + +## Usage + +```js +var pathIsAbsolute = require('path-is-absolute'); + +// Linux +pathIsAbsolute('/home/foo'); +//=> true + +// Windows +pathIsAbsolute('C:/Users/'); +//=> true + +// Any OS +pathIsAbsolute.posix('/home/foo'); +//=> true +``` + + +## API + +See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). + +### pathIsAbsolute(path) + +### pathIsAbsolute.posix(path) + +The Posix specific version. + +### pathIsAbsolute.win32(path) + +The Windows specific version. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/package.json new file mode 100755 index 0000000..1cbc310 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/package.json @@ -0,0 +1,73 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "glob", + "description": "a little globber", + "version": "5.0.15", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "main": "glob.js", + "files": [ + "glob.js", + "sync.js", + "common.js" + ], + "engines": { + "node": "*" + }, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "devDependencies": { + "mkdirp": "0", + "rimraf": "^2.2.8", + "tap": "^1.1.4", + "tick": "0.0.6" + }, + "scripts": { + "prepublish": "npm run benchclean", + "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", + "bench": "bash benchmark.sh", + "prof": "bash prof.sh && cat profile.txt", + "benchclean": "node benchclean.js" + }, + "license": "ISC", + "gitHead": "3a7e71d453dd80e75b196fd262dd23ed54beeceb", + "bugs": { + "url": "https://github.com/isaacs/node-glob/issues" + }, + "homepage": "https://github.com/isaacs/node-glob#readme", + "_id": "glob@5.0.15", + "_shasum": "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1", + "_from": "glob@^5.0.13", + "_npmVersion": "3.3.2", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1", + "tarball": "http://registry.npmjs.org/glob/-/glob-5.0.15.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/glob/sync.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/osenv/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/osenv/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/osenv/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/osenv/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/osenv/node_modules/os-homedir/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/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/cordova-common/node_modules/osenv/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/cordova-common/node_modules/osenv/node_modules/os-homedir/license b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/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/cordova-common/node_modules/osenv/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/cordova-common/node_modules/osenv/node_modules/os-homedir/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/node_modules/os-homedir/package.json new file mode 100755 index 0000000..3428648 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/node_modules/os-homedir/package.json @@ -0,0 +1,70 @@ +{ + "name": "os-homedir", + "version": "1.0.1", + "description": "io.js 2.3.0 os.homedir() ponyfill", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/sindresorhus/os-homedir" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "built-in", + "core", + "ponyfill", + "polyfill", + "shim", + "os", + "homedir", + "home", + "dir", + "directory", + "folder", + "user", + "path" + ], + "devDependencies": { + "ava": "0.0.4", + "path-exists": "^1.0.0" + }, + "gitHead": "13ff83fbd13ebe286a6092286b2c634ab4534c5f", + "bugs": { + "url": "https://github.com/sindresorhus/os-homedir/issues" + }, + "homepage": "https://github.com/sindresorhus/os-homedir", + "_id": "os-homedir@1.0.1", + "_shasum": "0d62bdf44b916fd3bbdcf2cab191948fb094f007", + "_from": "os-homedir@^1.0.0", + "_npmVersion": "2.11.2", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "dist": { + "shasum": "0d62bdf44b916fd3bbdcf2cab191948fb094f007", + "tarball": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/node_modules/os-homedir/readme.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/node_modules/os-homedir/readme.md new file mode 100755 index 0000000..4851f10 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/node_modules/os-homedir/readme.md @@ -0,0 +1,33 @@ +# os-homedir [![Build Status](https://travis-ci.org/sindresorhus/os-homedir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-homedir) + +> io.js 2.3.0 [`os.homedir()`](https://iojs.org/api/os.html#os_os_homedir) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## Install + +``` +$ npm install --save os-homedir +``` + + +## Usage + +```js +var 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](http://sindresorhus.com) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/node_modules/os-tmpdir/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/node_modules/os-tmpdir/index.js new file mode 100755 index 0000000..52d90bf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/node_modules/os-tmpdir/index.js @@ -0,0 +1,25 @@ +'use strict'; +var isWindows = process.platform === 'win32'; +var trailingSlashRe = isWindows ? /[^:]\\$/ : /.\/$/; + +// https://github.com/nodejs/io.js/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/cordova-common/node_modules/osenv/node_modules/os-tmpdir/license b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/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/cordova-common/node_modules/osenv/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/cordova-common/node_modules/osenv/node_modules/os-tmpdir/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/node_modules/os-tmpdir/package.json new file mode 100755 index 0000000..6a24e0b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/node_modules/os-tmpdir/package.json @@ -0,0 +1,70 @@ +{ + "name": "os-tmpdir", + "version": "1.0.1", + "description": "Node.js os.tmpdir() ponyfill", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/sindresorhus/os-tmpdir" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "built-in", + "core", + "ponyfill", + "polyfill", + "shim", + "os", + "tmpdir", + "tempdir", + "tmp", + "temp", + "dir", + "directory", + "env", + "environment" + ], + "devDependencies": { + "ava": "0.0.4" + }, + "gitHead": "5c5d355f81378980db629d60128ad03e02b1c1e5", + "bugs": { + "url": "https://github.com/sindresorhus/os-tmpdir/issues" + }, + "homepage": "https://github.com/sindresorhus/os-tmpdir", + "_id": "os-tmpdir@1.0.1", + "_shasum": "e9b423a1edaf479882562e92ed71d7743a071b6e", + "_from": "os-tmpdir@^1.0.0", + "_npmVersion": "2.9.1", + "_nodeVersion": "0.12.3", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "dist": { + "shasum": "e9b423a1edaf479882562e92ed71d7743a071b6e", + "tarball": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/node_modules/os-tmpdir/readme.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/node_modules/os-tmpdir/readme.md new file mode 100755 index 0000000..54d4c6e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/node_modules/os-tmpdir/readme.md @@ -0,0 +1,36 @@ +# 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 + +> Ponyfill: A polyfill that doesn't overwrite the native method + +Use this instead of `require('os').tmpdir()` to get a consistent behaviour on different Node.js versions (even 0.8). + +*This is actually taken from io.js 2.0.2 as it contains some fixes that haven't bubbled up to Node.js yet.* + + +## Install + +``` +$ npm install --save os-tmpdir +``` + + +## Usage + +```js +var 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](http://sindresorhus.com) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/osenv.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/osenv/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/package.json new file mode 100755 index 0000000..4fb1e6c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/package.json @@ -0,0 +1,76 @@ +{ + "name": "osenv", + "version": "0.1.3", + "main": "osenv.js", + "directories": { + "test": "test" + }, + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + }, + "devDependencies": { + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/osenv.git" + }, + "keywords": [ + "environment", + "variable", + "home", + "tmpdir", + "path", + "prompt", + "ps1" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "description": "Look up environment settings specific to different operating systems", + "gitHead": "f746b3405d8f9e28054d11b97e1436f6a15016c4", + "bugs": { + "url": "https://github.com/npm/osenv/issues" + }, + "homepage": "https://github.com/npm/osenv#readme", + "_id": "osenv@0.1.3", + "_shasum": "83cf05c6d6458fc4d5ac6362ea325d92f2754217", + "_from": "osenv@^0.1.3", + "_npmVersion": "3.0.0", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "83cf05c6d6458fc4d5ac6362ea325d92f2754217", + "tarball": "http://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz" + }, + "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" + } + ], + "_resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/node_modules/osenv/test/unix.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/osenv/test/windows.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/osenv/x.tap b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/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/cordova-common/node_modules/q/CHANGES.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/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/cordova-common/node_modules/q/CHANGES.md @@ -0,0 +1,786 @@ + +## 1.4.1 + + - Address an issue that prevented Q from being used as a ` + +``` + + +## 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..078738e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/plist/dist/plist-build.js @@ -0,0 +1,12596 @@ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.plist=e()}}(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 + } + + module.exports.toByteArray = b64ToByteArray + module.exports.fromByteArray = uint8ToBase64 +}()) + +},{}],3:[function(require,module,exports){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +var base64 = require('base64-js') +var ieee754 = require('ieee754') + +exports.Buffer = Buffer +exports.SlowBuffer = Buffer +exports.INSPECT_MAX_BYTES = 50 +Buffer.poolSize = 8192 + +/** + * If `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+. + * + * Note: + * + * - Implementation must support adding new properties to `Uint8Array` instances. + * Firefox 4-29 lacked support, fixed in Firefox 30+. + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - 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 `TYPED_ARRAY_SUPPORT` to `false` so they will + * get the Object implementation, which is slower but will work correctly. + */ +var TYPED_ARRAY_SUPPORT = (function () { + try { + var buf = new ArrayBuffer(0) + var arr = new Uint8Array(buf) + arr.foo = function () { return 42 } + return 42 === arr.foo() && // typed array instances can be augmented + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +})() + +/** + * 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 (subject, encoding, noZero) { + if (!(this instanceof Buffer)) + return new Buffer(subject, encoding, noZero) + + var type = typeof subject + + // Find the length + var length + if (type === 'number') + length = subject > 0 ? subject >>> 0 : 0 + else if (type === 'string') { + if (encoding === 'base64') + subject = base64clean(subject) + length = Buffer.byteLength(subject, encoding) + } else if (type === 'object' && subject !== null) { // assume object is array-like + if (subject.type === 'Buffer' && isArray(subject.data)) + subject = subject.data + length = +subject.length > 0 ? Math.floor(+subject.length) : 0 + } else + throw new Error('First argument needs to be a number, array or string.') + + var buf + if (TYPED_ARRAY_SUPPORT) { + // Preferred: Return an augmented `Uint8Array` instance for best performance + buf = Buffer._augment(new Uint8Array(length)) + } else { + // Fallback: Return THIS instance of Buffer (created by `new`) + buf = this + buf.length = length + buf._isBuffer = true + } + + var i + if (TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') { + // Speed optimization -- use set if we're copying from a typed array + buf._set(subject) + } else if (isArrayish(subject)) { + // Treat array-ish objects as a byte array + if (Buffer.isBuffer(subject)) { + for (i = 0; i < length; i++) + buf[i] = subject.readUInt8(i) + } else { + for (i = 0; i < length; i++) + buf[i] = ((subject[i] % 256) + 256) % 256 + } + } else if (type === 'string') { + buf.write(subject, 0, encoding) + } else if (type === 'number' && !TYPED_ARRAY_SUPPORT && !noZero) { + for (i = 0; i < length; i++) { + buf[i] = 0 + } + } + + return buf +} + +// STATIC METHODS +// ============== + +Buffer.isEncoding = function (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.isBuffer = function (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.byteLength = function (str, encoding) { + var ret + str = str.toString() + switch (encoding || 'utf8') { + case 'hex': + ret = str.length / 2 + break + case 'utf8': + case 'utf-8': + ret = utf8ToBytes(str).length + break + case 'ascii': + case 'binary': + case 'raw': + ret = str.length + break + case 'base64': + ret = base64ToBytes(str).length + break + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + ret = str.length * 2 + break + default: + throw new Error('Unknown encoding') + } + return ret +} + +Buffer.concat = function (list, totalLength) { + assert(isArray(list), 'Usage: Buffer.concat(list[, length])') + + if (list.length === 0) { + return new Buffer(0) + } else if (list.length === 1) { + return list[0] + } + + var i + if (totalLength === undefined) { + totalLength = 0 + for (i = 0; i < list.length; i++) { + totalLength += list[i].length + } + } + + var buf = new Buffer(totalLength) + var pos = 0 + for (i = 0; i < list.length; i++) { + var item = list[i] + item.copy(buf, pos) + pos += item.length + } + return buf +} + +Buffer.compare = function (a, b) { + assert(Buffer.isBuffer(a) && Buffer.isBuffer(b), 'Arguments must be Buffers') + var x = a.length + var y = b.length + for (var i = 0, len = Math.min(x, y); i < len && a[i] === b[i]; i++) {} + if (i !== len) { + x = a[i] + y = b[i] + } + if (x < y) { + return -1 + } + if (y < x) { + return 1 + } + return 0 +} + +// BUFFER INSTANCE METHODS +// ======================= + +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 + assert(strLen % 2 === 0, 'Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; i++) { + var byte = parseInt(string.substr(i * 2, 2), 16) + assert(!isNaN(byte), 'Invalid hex string') + buf[offset + i] = byte + } + return i +} + +function utf8Write (buf, string, offset, length) { + var charsWritten = blitBuffer(utf8ToBytes(string), buf, offset, length) + return charsWritten +} + +function asciiWrite (buf, string, offset, length) { + var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length) + return charsWritten +} + +function binaryWrite (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length) + return charsWritten +} + +function utf16leWrite (buf, string, offset, length) { + var charsWritten = blitBuffer(utf16leToBytes(string), buf, offset, length) + return charsWritten +} + +Buffer.prototype.write = function (string, offset, length, encoding) { + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length + length = undefined + } + } else { // legacy + var swap = encoding + encoding = offset + offset = length + length = swap + } + + offset = Number(offset) || 0 + var remaining = this.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + encoding = String(encoding || 'utf8').toLowerCase() + + var ret + switch (encoding) { + case 'hex': + ret = hexWrite(this, string, offset, length) + break + case 'utf8': + case 'utf-8': + ret = utf8Write(this, string, offset, length) + break + case 'ascii': + ret = asciiWrite(this, string, offset, length) + break + case 'binary': + ret = binaryWrite(this, string, offset, length) + break + case 'base64': + ret = base64Write(this, string, offset, length) + break + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + ret = utf16leWrite(this, string, offset, length) + break + default: + throw new Error('Unknown encoding') + } + return ret +} + +Buffer.prototype.toString = function (encoding, start, end) { + var self = this + + encoding = String(encoding || 'utf8').toLowerCase() + start = Number(start) || 0 + end = (end === undefined) ? self.length : Number(end) + + // Fastpath empty strings + if (end === start) + return '' + + var ret + switch (encoding) { + case 'hex': + ret = hexSlice(self, start, end) + break + case 'utf8': + case 'utf-8': + ret = utf8Slice(self, start, end) + break + case 'ascii': + ret = asciiSlice(self, start, end) + break + case 'binary': + ret = binarySlice(self, start, end) + break + case 'base64': + ret = base64Slice(self, start, end) + break + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + ret = utf16leSlice(self, start, end) + break + default: + throw new Error('Unknown encoding') + } + return ret +} + +Buffer.prototype.toJSON = function () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +Buffer.prototype.equals = function (b) { + assert(Buffer.isBuffer(b), 'Argument must be a Buffer') + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.compare = function (b) { + assert(Buffer.isBuffer(b), 'Argument must be a Buffer') + return Buffer.compare(this, b) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function (target, target_start, start, end) { + var source = this + + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (!target_start) target_start = 0 + + // Copy 0 bytes; we're done + if (end === start) return + if (target.length === 0 || source.length === 0) return + + // Fatal error conditions + assert(end >= start, 'sourceEnd < sourceStart') + assert(target_start >= 0 && target_start < target.length, + 'targetStart out of bounds') + assert(start >= 0 && start < source.length, 'sourceStart out of bounds') + assert(end >= 0 && end <= source.length, 'sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) + end = this.length + if (target.length - target_start < end - start) + end = target.length - target_start + start + + var len = end - start + + if (len < 100 || !TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < len; i++) { + target[i + target_start] = this[i + start] + } + } else { + target._set(this.subarray(start, start + len), target_start) + } +} + +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) { + var res = '' + var tmp = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + if (buf[i] <= 0x7F) { + res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i]) + tmp = '' + } else { + tmp += '%' + buf[i].toString(16) + } + } + + return res + decodeUtf8Char(tmp) +} + +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]) + } + return ret +} + +function binarySlice (buf, start, end) { + return asciiSlice(buf, start, end) +} + +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 (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 + + if (TYPED_ARRAY_SUPPORT) { + return Buffer._augment(this.subarray(start, end)) + } else { + var sliceLen = end - start + var newBuf = new Buffer(sliceLen, undefined, true) + for (var i = 0; i < sliceLen; i++) { + newBuf[i] = this[i + start] + } + return newBuf + } +} + +// `get` will be removed in Node 0.13+ +Buffer.prototype.get = function (offset) { + console.log('.get() is deprecated. Access using array indexes instead.') + return this.readUInt8(offset) +} + +// `set` will be removed in Node 0.13+ +Buffer.prototype.set = function (v, offset) { + console.log('.set() is deprecated. Access using array indexes instead.') + return this.writeUInt8(v, offset) +} + +Buffer.prototype.readUInt8 = function (offset, noAssert) { + if (!noAssert) { + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset < this.length, 'Trying to read beyond buffer length') + } + + if (offset >= this.length) + return + + return this[offset] +} + +function readUInt16 (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 1 < buf.length, 'Trying to read beyond buffer length') + } + + var len = buf.length + if (offset >= len) + return + + var val + if (littleEndian) { + val = buf[offset] + if (offset + 1 < len) + val |= buf[offset + 1] << 8 + } else { + val = buf[offset] << 8 + if (offset + 1 < len) + val |= buf[offset + 1] + } + return val +} + +Buffer.prototype.readUInt16LE = function (offset, noAssert) { + return readUInt16(this, offset, true, noAssert) +} + +Buffer.prototype.readUInt16BE = function (offset, noAssert) { + return readUInt16(this, offset, false, noAssert) +} + +function readUInt32 (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'Trying to read beyond buffer length') + } + + var len = buf.length + if (offset >= len) + return + + var val + if (littleEndian) { + if (offset + 2 < len) + val = buf[offset + 2] << 16 + if (offset + 1 < len) + val |= buf[offset + 1] << 8 + val |= buf[offset] + if (offset + 3 < len) + val = val + (buf[offset + 3] << 24 >>> 0) + } else { + if (offset + 1 < len) + val = buf[offset + 1] << 16 + if (offset + 2 < len) + val |= buf[offset + 2] << 8 + if (offset + 3 < len) + val |= buf[offset + 3] + val = val + (buf[offset] << 24 >>> 0) + } + return val +} + +Buffer.prototype.readUInt32LE = function (offset, noAssert) { + return readUInt32(this, offset, true, noAssert) +} + +Buffer.prototype.readUInt32BE = function (offset, noAssert) { + return readUInt32(this, offset, false, noAssert) +} + +Buffer.prototype.readInt8 = function (offset, noAssert) { + if (!noAssert) { + assert(offset !== undefined && offset !== null, + 'missing offset') + assert(offset < this.length, 'Trying to read beyond buffer length') + } + + if (offset >= this.length) + return + + var neg = this[offset] & 0x80 + if (neg) + return (0xff - this[offset] + 1) * -1 + else + return this[offset] +} + +function readInt16 (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 1 < buf.length, 'Trying to read beyond buffer length') + } + + var len = buf.length + if (offset >= len) + return + + var val = readUInt16(buf, offset, littleEndian, true) + var neg = val & 0x8000 + if (neg) + return (0xffff - val + 1) * -1 + else + return val +} + +Buffer.prototype.readInt16LE = function (offset, noAssert) { + return readInt16(this, offset, true, noAssert) +} + +Buffer.prototype.readInt16BE = function (offset, noAssert) { + return readInt16(this, offset, false, noAssert) +} + +function readInt32 (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'Trying to read beyond buffer length') + } + + var len = buf.length + if (offset >= len) + return + + var val = readUInt32(buf, offset, littleEndian, true) + var neg = val & 0x80000000 + if (neg) + return (0xffffffff - val + 1) * -1 + else + return val +} + +Buffer.prototype.readInt32LE = function (offset, noAssert) { + return readInt32(this, offset, true, noAssert) +} + +Buffer.prototype.readInt32BE = function (offset, noAssert) { + return readInt32(this, offset, false, noAssert) +} + +function readFloat (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset + 3 < buf.length, 'Trying to read beyond buffer length') + } + + return ieee754.read(buf, offset, littleEndian, 23, 4) +} + +Buffer.prototype.readFloatLE = function (offset, noAssert) { + return readFloat(this, offset, true, noAssert) +} + +Buffer.prototype.readFloatBE = function (offset, noAssert) { + return readFloat(this, offset, false, noAssert) +} + +function readDouble (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset + 7 < buf.length, 'Trying to read beyond buffer length') + } + + return ieee754.read(buf, offset, littleEndian, 52, 8) +} + +Buffer.prototype.readDoubleLE = function (offset, noAssert) { + return readDouble(this, offset, true, noAssert) +} + +Buffer.prototype.readDoubleBE = function (offset, noAssert) { + return readDouble(this, offset, false, noAssert) +} + +Buffer.prototype.writeUInt8 = function (value, offset, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset < this.length, 'trying to write beyond buffer length') + verifuint(value, 0xff) + } + + if (offset >= this.length) return + + this[offset] = value + return offset + 1 +} + +function writeUInt16 (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 1 < buf.length, 'trying to write beyond buffer length') + verifuint(value, 0xffff) + } + + var len = buf.length + if (offset >= len) + return + + for (var i = 0, j = Math.min(len - offset, 2); i < j; i++) { + buf[offset + i] = + (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } + return offset + 2 +} + +Buffer.prototype.writeUInt16LE = function (value, offset, noAssert) { + return writeUInt16(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeUInt16BE = function (value, offset, noAssert) { + return writeUInt16(this, value, offset, false, noAssert) +} + +function writeUInt32 (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'trying to write beyond buffer length') + verifuint(value, 0xffffffff) + } + + var len = buf.length + if (offset >= len) + return + + for (var i = 0, j = Math.min(len - offset, 4); i < j; i++) { + buf[offset + i] = + (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } + return offset + 4 +} + +Buffer.prototype.writeUInt32LE = function (value, offset, noAssert) { + return writeUInt32(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeUInt32BE = function (value, offset, noAssert) { + return writeUInt32(this, value, offset, false, noAssert) +} + +Buffer.prototype.writeInt8 = function (value, offset, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset < this.length, 'Trying to write beyond buffer length') + verifsint(value, 0x7f, -0x80) + } + + if (offset >= this.length) + return + + if (value >= 0) + this.writeUInt8(value, offset, noAssert) + else + this.writeUInt8(0xff + value + 1, offset, noAssert) + return offset + 1 +} + +function writeInt16 (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 1 < buf.length, 'Trying to write beyond buffer length') + verifsint(value, 0x7fff, -0x8000) + } + + var len = buf.length + if (offset >= len) + return + + if (value >= 0) + writeUInt16(buf, value, offset, littleEndian, noAssert) + else + writeUInt16(buf, 0xffff + value + 1, offset, littleEndian, noAssert) + return offset + 2 +} + +Buffer.prototype.writeInt16LE = function (value, offset, noAssert) { + return writeInt16(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeInt16BE = function (value, offset, noAssert) { + return writeInt16(this, value, offset, false, noAssert) +} + +function writeInt32 (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'Trying to write beyond buffer length') + verifsint(value, 0x7fffffff, -0x80000000) + } + + var len = buf.length + if (offset >= len) + return + + if (value >= 0) + writeUInt32(buf, value, offset, littleEndian, noAssert) + else + writeUInt32(buf, 0xffffffff + value + 1, offset, littleEndian, noAssert) + return offset + 4 +} + +Buffer.prototype.writeInt32LE = function (value, offset, noAssert) { + return writeInt32(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeInt32BE = function (value, offset, noAssert) { + return writeInt32(this, value, offset, false, noAssert) +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'Trying to write beyond buffer length') + verifIEEE754(value, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + + var len = buf.length + if (offset >= len) + return + + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof littleEndian === 'boolean', 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 7 < buf.length, + 'Trying to write beyond buffer length') + verifIEEE754(value, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + + var len = buf.length + if (offset >= len) + return + + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// fill(value, start=0, end=buffer.length) +Buffer.prototype.fill = function (value, start, end) { + if (!value) value = 0 + if (!start) start = 0 + if (!end) end = this.length + + assert(end >= start, 'end < start') + + // Fill 0 bytes; we're done + if (end === start) return + if (this.length === 0) return + + assert(start >= 0 && start < this.length, 'start out of bounds') + assert(end >= 0 && end <= this.length, '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 +} + +Buffer.prototype.inspect = function () { + var out = [] + var len = this.length + for (var i = 0; i < len; i++) { + out[i] = toHex(this[i]) + if (i === exports.INSPECT_MAX_BYTES) { + out[i + 1] = '...' + break + } + } + return '' +} + +/** + * 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 () { + if (typeof Uint8Array !== 'undefined') { + if (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 Error('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 (arr) { + arr._isBuffer = true + + // save reference to original Uint8Array get/set methods before overwriting + arr._get = arr.get + arr._set = arr.set + + // deprecated, will be removed in node 0.13+ + 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.copy = BP.copy + arr.slice = BP.slice + arr.readUInt8 = BP.readUInt8 + arr.readUInt16LE = BP.readUInt16LE + arr.readUInt16BE = BP.readUInt16BE + arr.readUInt32LE = BP.readUInt32LE + arr.readUInt32BE = BP.readUInt32BE + 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.writeUInt16LE = BP.writeUInt16LE + arr.writeUInt16BE = BP.writeUInt16BE + arr.writeUInt32LE = BP.writeUInt32LE + arr.writeUInt32BE = BP.writeUInt32BE + 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-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 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 isArray (subject) { + return (Array.isArray || function (subject) { + return Object.prototype.toString.call(subject) === '[object Array]' + })(subject) +} + +function isArrayish (subject) { + return isArray(subject) || Buffer.isBuffer(subject) || + subject && typeof subject === 'object' && + typeof subject.length === 'number' +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; i++) { + var b = str.charCodeAt(i) + if (b <= 0x7F) { + byteArray.push(b) + } else { + var start = i + if (b >= 0xD800 && b <= 0xDFFF) i++ + var h = encodeURIComponent(str.slice(start, i+1)).substr(1).split('%') + for (var j = 0; j < h.length; j++) { + byteArray.push(parseInt(h[j], 16)) + } + } + } + return byteArray +} + +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) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; i++) { + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(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 +} + +function decodeUtf8Char (str) { + try { + return decodeURIComponent(str) + } catch (err) { + return String.fromCharCode(0xFFFD) // UTF 8 invalid char + } +} + +/* + * We have to make sure that the value is a valid integer. This means that it + * is non-negative. It has no fractional component and that it does not + * exceed the maximum allowed value. + */ +function verifuint (value, max) { + assert(typeof value === 'number', 'cannot write a non-number as a number') + assert(value >= 0, 'specified a negative value for writing an unsigned value') + assert(value <= max, 'value is larger than maximum value for type') + assert(Math.floor(value) === value, 'value has a fractional component') +} + +function verifsint (value, max, min) { + assert(typeof value === 'number', 'cannot write a non-number as a number') + assert(value <= max, 'value larger than maximum allowed value') + assert(value >= min, 'value smaller than minimum allowed value') + assert(Math.floor(value) === value, 'value has a fractional component') +} + +function verifIEEE754 (value, max, min) { + assert(typeof value === 'number', 'cannot write a non-number as a number') + assert(value <= max, 'value larger than maximum allowed value') + assert(value >= min, 'value smaller than minimum allowed value') +} + +function assert (test, message) { + if (!test) throw new Error(message || 'Failed assertion') +} + +},{"base64-js":2,"ieee754":4}],4:[function(require,module,exports){ +exports.read = function(buffer, offset, isLE, mLen, nBytes) { + var e, m, + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + nBits = -7, + i = isLE ? (nBytes - 1) : 0, + d = isLE ? -1 : 1, + 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, + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0), + i = isLE ? 0 : (nBytes - 1), + d = isLE ? 1 : -1, + 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){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLAttribute, _; + + _ = require('lodash-node'); + + module.exports = XMLAttribute = (function() { + function XMLAttribute(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing attribute name"); + } + if (value == null) { + throw new Error("Missing attribute value"); + } + 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-node":95}],6:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLBuilder, XMLDeclaration, XMLDocType, XMLElement, XMLStringifier, _; + + _ = require('lodash-node'); + + 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 toString(options); + }; + + XMLBuilder.prototype.toString = function(options) { + var indent, newline, pretty, r; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (options != null ? options.indent : void 0) || ' '; + newline = (options != null ? options.newline : void 0) || '\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":13,"./XMLDocType":14,"./XMLElement":15,"./XMLStringifier":19,"lodash-node":95}],7:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLCData, XMLNode, _, + __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; }; + + _ = require('lodash-node'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLCData = (function(_super) { + __extends(XMLCData, _super); + + 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, pretty, r, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (options != null ? options.indent : void 0) || ' '; + newline = (options != null ? options.newline : void 0) || '\n'; + level || (level = 0); + space = new Array(level + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLCData; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":16,"lodash-node":95}],8:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLComment, XMLNode, _, + __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; }; + + _ = require('lodash-node'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLComment = (function(_super) { + __extends(XMLComment, _super); + + 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, pretty, r, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (options != null ? options.indent : void 0) || ' '; + newline = (options != null ? options.newline : void 0) || '\n'; + level || (level = 0); + space = new Array(level + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLComment; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":16,"lodash-node":95}],9:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLDTDAttList, _; + + _ = require('lodash-node'); + + 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.clone = function() { + return _.create(XMLDTDAttList.prototype, this); + }; + + XMLDTDAttList.prototype.toString = function(options, level) { + var indent, newline, pretty, r, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (options != null ? options.indent : void 0) || ' '; + newline = (options != null ? options.newline : void 0) || '\n'; + level || (level = 0); + space = new Array(level + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDAttList; + + })(); + +}).call(this); + +},{"lodash-node":95}],10:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLDTDElement, _; + + _ = require('lodash-node'); + + 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 (_.isArray(value)) { + value = '(' + value.join(',') + ')'; + } + this.name = this.stringify.eleName(name); + this.value = this.stringify.dtdElementValue(value); + } + + XMLDTDElement.prototype.clone = function() { + return _.create(XMLDTDElement.prototype, this); + }; + + XMLDTDElement.prototype.toString = function(options, level) { + var indent, newline, pretty, r, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (options != null ? options.indent : void 0) || ' '; + newline = (options != null ? options.newline : void 0) || '\n'; + level || (level = 0); + space = new Array(level + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDElement; + + })(); + +}).call(this); + +},{"lodash-node":95}],11:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLDTDEntity, _; + + _ = require('lodash-node'); + + 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.clone = function() { + return _.create(XMLDTDEntity.prototype, this); + }; + + XMLDTDEntity.prototype.toString = function(options, level) { + var indent, newline, pretty, r, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (options != null ? options.indent : void 0) || ' '; + newline = (options != null ? options.newline : void 0) || '\n'; + level || (level = 0); + space = new Array(level + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDEntity; + + })(); + +}).call(this); + +},{"lodash-node":95}],12:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLDTDNotation, _; + + _ = require('lodash-node'); + + 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.clone = function() { + return _.create(XMLDTDNotation.prototype, this); + }; + + XMLDTDNotation.prototype.toString = function(options, level) { + var indent, newline, pretty, r, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (options != null ? options.indent : void 0) || ' '; + newline = (options != null ? options.newline : void 0) || '\n'; + level || (level = 0); + space = new Array(level + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDNotation; + + })(); + +}).call(this); + +},{"lodash-node":95}],13:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLDeclaration, XMLNode, _, + __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; }; + + _ = require('lodash-node'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLDeclaration = (function(_super) { + __extends(XMLDeclaration, _super); + + 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'; + } + if (version != null) { + 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.clone = function() { + return _.create(XMLDeclaration.prototype, this); + }; + + XMLDeclaration.prototype.toString = function(options, level) { + var indent, newline, pretty, r, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (options != null ? options.indent : void 0) || ' '; + newline = (options != null ? options.newline : void 0) || '\n'; + level || (level = 0); + space = new Array(level + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDeclaration; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":16,"lodash-node":95}],14:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLDocType, _; + + _ = require('lodash-node'); + + 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.clone = function() { + return _.create(XMLDocType.prototype, this); + }; + + XMLDocType.prototype.element = function(name, value) { + var XMLDTDElement, child; + XMLDTDElement = require('./XMLDTDElement'); + child = new XMLDTDElement(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var XMLDTDAttList, child; + XMLDTDAttList = require('./XMLDTDAttList'); + child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.entity = function(name, value) { + var XMLDTDEntity, child; + XMLDTDEntity = require('./XMLDTDEntity'); + child = new XMLDTDEntity(this, false, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.pEntity = function(name, value) { + var XMLDTDEntity, child; + XMLDTDEntity = require('./XMLDTDEntity'); + child = new XMLDTDEntity(this, true, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.notation = function(name, value) { + var XMLDTDNotation, child; + XMLDTDNotation = require('./XMLDTDNotation'); + child = new XMLDTDNotation(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.cdata = function(value) { + var XMLCData, child; + XMLCData = require('./XMLCData'); + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.comment = function(value) { + var XMLComment, child; + XMLComment = require('./XMLComment'); + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.instruction = function(target, value) { + var XMLProcessingInstruction, child; + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + 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, indent, newline, pretty, r, space, _i, _len, _ref; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (options != null ? options.indent : void 0) || ' '; + newline = (options != null ? options.newline : void 0) || '\n'; + level || (level = 0); + space = new Array(level + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ' 0) { + r += ' ['; + if (pretty) { + r += newline; + } + _ref = this.children; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_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":7,"./XMLComment":8,"./XMLDTDAttList":9,"./XMLDTDElement":10,"./XMLDTDEntity":11,"./XMLDTDNotation":12,"./XMLProcessingInstruction":17,"lodash-node":95}],15:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLAttribute, XMLElement, XMLNode, XMLProcessingInstruction, _, + __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; }; + + _ = require('lodash-node'); + + XMLNode = require('./XMLNode'); + + XMLAttribute = require('./XMLAttribute'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + module.exports = XMLElement = (function(_super) { + __extends(XMLElement, _super); + + 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, pi, _i, _len, _ref, _ref1; + clonedSelf = _.create(XMLElement.prototype, this); + 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 (_.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"); + } + if (_.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 insTarget, insValue, instruction, _i, _len; + if (_.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, indent, instruction, name, newline, pretty, r, space, _i, _j, _len, _len1, _ref, _ref1, _ref2; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (options != null ? options.indent : void 0) || ' '; + newline = (options != null ? options.newline : void 0) || '\n'; + level || (level = 0); + space = new Array(level + 1).join(indent); + r = ''; + _ref = this.instructions; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + instruction = _ref[_i]; + r += instruction.toString(options, level + 1); + } + if (pretty) { + r += space; + } + r += '<' + this.name; + _ref1 = this.attributes; + for (name in _ref1) { + if (!__hasProp.call(_ref1, name)) continue; + att = _ref1[name]; + r += att.toString(options); + } + if (this.children.length === 0) { + 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; + } + _ref2 = this.children; + for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) { + child = _ref2[_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":5,"./XMLNode":16,"./XMLProcessingInstruction":17,"lodash-node":95}],16:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLNode, _, + __hasProp = {}.hasOwnProperty; + + _ = require('lodash-node'); + + module.exports = XMLNode = (function() { + function XMLNode(parent) { + this.parent = parent; + this.options = this.parent.options; + this.stringify = this.parent.stringify; + } + + XMLNode.prototype.clone = function() { + throw new Error("Cannot clone generic XMLNode"); + }; + + XMLNode.prototype.element = function(name, attributes, text) { + var item, key, lastChild, val, _i, _len, _ref; + lastChild = null; + if (attributes == null) { + attributes = {}; + } + if (!_.isObject(attributes)) { + _ref = [attributes, text], text = _ref[0], attributes = _ref[1]; + } + if (_.isArray(name)) { + for (_i = 0, _len = name.length; _i < _len; _i++) { + item = name[_i]; + 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 (!(val != null)) { + continue; + } + if (_.isFunction(val)) { + val = val.apply(); + } + 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 (_.isObject(val)) { + if (!this.options.ignoreDecorators && this.stringify.convertListKey && key.indexOf(this.stringify.convertListKey) === 0 && _.isArray(val)) { + lastChild = this.element(val); + } else { + 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 XMLElement, child, _ref; + if (attributes == null) { + attributes = {}; + } + if (!_.isObject(attributes)) { + _ref = [attributes, text], text = _ref[0], attributes = _ref[1]; + } + XMLElement = require('./XMLElement'); + child = new XMLElement(this, name, attributes); + if (text != null) { + child.text(text); + } + this.children.push(child); + return child; + }; + + XMLNode.prototype.text = function(value) { + var XMLText, child; + XMLText = require('./XMLText'); + child = new XMLText(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.cdata = function(value) { + var XMLCData, child; + XMLCData = require('./XMLCData'); + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.comment = function(value) { + var XMLComment, child; + XMLComment = require('./XMLComment'); + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.raw = function(value) { + var XMLRaw, child; + XMLRaw = require('./XMLRaw'); + child = new XMLRaw(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.declaration = function(version, encoding, standalone) { + var XMLDeclaration, doc, xmldec; + doc = this.document(); + XMLDeclaration = require('./XMLDeclaration'); + xmldec = new XMLDeclaration(doc, version, encoding, standalone); + doc.xmldec = xmldec; + return doc.root(); + }; + + XMLNode.prototype.doctype = function(pubID, sysID) { + var XMLDocType, doc, doctype; + doc = this.document(); + XMLDocType = require('./XMLDocType'); + 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":7,"./XMLComment":8,"./XMLDeclaration":13,"./XMLDocType":14,"./XMLElement":15,"./XMLRaw":18,"./XMLText":20,"lodash-node":95}],17:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLProcessingInstruction, _; + + _ = require('lodash-node'); + + 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, pretty, r, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (options != null ? options.indent : void 0) || ' '; + newline = (options != null ? options.newline : void 0) || '\n'; + level || (level = 0); + space = new Array(level + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLProcessingInstruction; + + })(); + +}).call(this); + +},{"lodash-node":95}],18:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLNode, XMLRaw, _, + __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; }; + + _ = require('lodash-node'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLRaw = (function(_super) { + __extends(XMLRaw, _super); + + 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, pretty, r, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (options != null ? options.indent : void 0) || ' '; + newline = (options != null ? options.newline : void 0) || '\n'; + level || (level = 0); + space = new Array(level + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += this.value; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLRaw; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":16,"lodash-node":95}],19:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(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, value, _ref; + 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.escape(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(this.escape(val)); + }; + + XMLStringifier.prototype.raw = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attName = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attValue = function(val) { + val = '' + val || ''; + return this.escape(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: " + options.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.convertListKey = '#list'; + + 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.escape = function(str) { + return str.replace(/&/g, '&').replace(//g, '>').replace(/'/g, ''').replace(/"/g, '"'); + }; + + return XMLStringifier; + + })(); + +}).call(this); + +},{}],20:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLNode, XMLText, _, + __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; }; + + _ = require('lodash-node'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLText = (function(_super) { + __extends(XMLText, _super); + + function XMLText(parent, text) { + this.parent = parent; + XMLText.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing element text"); + } + this.value = this.stringify.eleText(text); + } + + XMLText.prototype.clone = function() { + return _.create(XMLText.prototype, this); + }; + + XMLText.prototype.toString = function(options, level) { + var indent, newline, pretty, r, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (options != null ? options.indent : void 0) || ' '; + newline = (options != null ? options.newline : void 0) || '\n'; + level || (level = 0); + space = new Array(level + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += this.value; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLText; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":16,"lodash-node":95}],21:[function(require,module,exports){ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLBuilder, _; + + _ = require('lodash-node'); + + XMLBuilder = require('./XMLBuilder'); + + module.exports.create = function(name, xmldec, doctype, options) { + options = _.extend({}, xmldec, doctype, options); + return new XMLBuilder(name, options).root(); + }; + +}).call(this); + +},{"./XMLBuilder":6,"lodash-node":95}],22:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +module.exports = { + 'compact': require('./arrays/compact'), + 'difference': require('./arrays/difference'), + 'drop': require('./arrays/rest'), + 'findIndex': require('./arrays/findIndex'), + 'findLastIndex': require('./arrays/findLastIndex'), + 'first': require('./arrays/first'), + 'flatten': require('./arrays/flatten'), + 'head': require('./arrays/first'), + 'indexOf': require('./arrays/indexOf'), + 'initial': require('./arrays/initial'), + 'intersection': require('./arrays/intersection'), + 'last': require('./arrays/last'), + 'lastIndexOf': require('./arrays/lastIndexOf'), + 'object': require('./arrays/zipObject'), + 'pull': require('./arrays/pull'), + 'range': require('./arrays/range'), + 'remove': require('./arrays/remove'), + 'rest': require('./arrays/rest'), + 'sortedIndex': require('./arrays/sortedIndex'), + 'tail': require('./arrays/rest'), + 'take': require('./arrays/first'), + 'union': require('./arrays/union'), + 'uniq': require('./arrays/uniq'), + 'unique': require('./arrays/uniq'), + 'unzip': require('./arrays/zip'), + 'without': require('./arrays/without'), + 'xor': require('./arrays/xor'), + 'zip': require('./arrays/zip'), + 'zipObject': require('./arrays/zipObject') +}; + +},{"./arrays/compact":23,"./arrays/difference":24,"./arrays/findIndex":25,"./arrays/findLastIndex":26,"./arrays/first":27,"./arrays/flatten":28,"./arrays/indexOf":29,"./arrays/initial":30,"./arrays/intersection":31,"./arrays/last":32,"./arrays/lastIndexOf":33,"./arrays/pull":34,"./arrays/range":35,"./arrays/remove":36,"./arrays/rest":37,"./arrays/sortedIndex":38,"./arrays/union":39,"./arrays/uniq":40,"./arrays/without":41,"./arrays/xor":42,"./arrays/zip":43,"./arrays/zipObject":44}],23:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are all falsey. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to compact. + * @returns {Array} Returns a 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, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result.push(value); + } + } + return result; +} + +module.exports = compact; + +},{}],24:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseDifference = require('../internals/baseDifference'), + baseFlatten = require('../internals/baseFlatten'); + +/** + * Creates an array excluding all values of the provided arrays using strict + * equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to process. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); + * // => [1, 3, 4] + */ +function difference(array) { + return baseDifference(array, baseFlatten(arguments, true, true, 1)); +} + +module.exports = difference; + +},{"../internals/baseDifference":102,"../internals/baseFlatten":103}],25:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'); + +/** + * This method is like `_.find` except that it returns the index of the first + * element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.findIndex(characters, function(chr) { + * return chr.age < 20; + * }); + * // => 2 + * + * // using "_.where" callback shorthand + * _.findIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findIndex(characters, 'blocked'); + * // => 1 + */ +function findIndex(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0; + + callback = createCallback(callback, thisArg, 3); + while (++index < length) { + if (callback(array[index], index, array)) { + return index; + } + } + return -1; +} + +module.exports = findIndex; + +},{"../functions/createCallback":84}],26:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'); + +/** + * This method is like `_.findIndex` except that it iterates over elements + * of a `collection` from right to left. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': true }, + * { 'name': 'fred', 'age': 40, 'blocked': false }, + * { 'name': 'pebbles', 'age': 1, 'blocked': true } + * ]; + * + * _.findLastIndex(characters, function(chr) { + * return chr.age > 30; + * }); + * // => 1 + * + * // using "_.where" callback shorthand + * _.findLastIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findLastIndex(characters, 'blocked'); + * // => 2 + */ +function findLastIndex(array, callback, thisArg) { + var length = array ? array.length : 0; + callback = createCallback(callback, thisArg, 3); + while (length--) { + if (callback(array[length], length, array)) { + return length; + } + } + return -1; +} + +module.exports = findLastIndex; + +},{"../functions/createCallback":84}],27:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + slice = require('../internals/slice'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the first element or first `n` elements of an array. If a callback + * is provided elements at the beginning of the array are returned as long + * as the callback returns truey. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias head, take + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the first element(s) of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([1, 2, 3], 2); + * // => [1, 2] + * + * _.first([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [1, 2] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.first(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': true, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.first(characters, { 'employer': 'slate' }), 'name'); + * // => ['barney', 'fred'] + */ +function first(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = -1; + callback = createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[0] : undefined; + } + } + return slice(array, 0, nativeMin(nativeMax(0, n), length)); +} + +module.exports = first; + +},{"../functions/createCallback":84,"../internals/slice":137}],28:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseFlatten = require('../internals/baseFlatten'), + map = require('../collections/map'); + +/** + * Flattens a nested array (the nesting can be to any depth). If `isShallow` + * is truey, the array will only be flattened a single level. If a callback + * is provided each element of the array is passed through the callback before + * flattening. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new flattened array. + * @example + * + * _.flatten([1, [2], [3, [[4]]]]); + * // => [1, 2, 3, 4]; + * + * _.flatten([1, [2], [3, [[4]]]], true); + * // => [1, 2, 3, [[4]]]; + * + * var characters = [ + * { 'name': 'barney', 'age': 30, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * // using "_.pluck" callback shorthand + * _.flatten(characters, 'pets'); + * // => ['hoppy', 'baby puss', 'dino'] + */ +function flatten(array, isShallow, callback, thisArg) { + // juggle arguments + if (typeof isShallow != 'boolean' && isShallow != null) { + thisArg = callback; + callback = (typeof isShallow != 'function' && thisArg && thisArg[isShallow] === array) ? null : isShallow; + isShallow = false; + } + if (callback != null) { + array = map(array, callback, thisArg); + } + return baseFlatten(array, isShallow); +} + +module.exports = flatten; + +},{"../collections/map":64,"../internals/baseFlatten":103}],29:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseIndexOf = require('../internals/baseIndexOf'), + sortedIndex = require('./sortedIndex'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max; + +/** + * Gets the index at which the first occurrence of `value` is found using + * strict equality for comparisons, i.e. `===`. If the array is already sorted + * providing `true` for `fromIndex` will run a faster binary search. + * + * @static + * @memberOf _ + * @category Arrays + * @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 or `-1`. + * @example + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2); + * // => 1 + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 4 + * + * _.indexOf([1, 1, 2, 2, 3, 3], 2, true); + * // => 2 + */ +function indexOf(array, value, fromIndex) { + if (typeof fromIndex == 'number') { + var length = array ? array.length : 0; + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0); + } else if (fromIndex) { + var index = sortedIndex(array, value); + return array[index] === value ? index : -1; + } + return baseIndexOf(array, value, fromIndex); +} + +module.exports = indexOf; + +},{"../internals/baseIndexOf":104,"./sortedIndex":38}],30:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + slice = require('../internals/slice'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets all but the last element or last `n` elements of an array. If a + * callback is provided elements at the end of the array are excluded from + * the result as long as the callback returns truey. The callback is bound + * to `thisArg` and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + * + * _.initial([1, 2, 3], 2); + * // => [1] + * + * _.initial([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [1] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.initial(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': false, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.initial(characters, { 'employer': 'na' }), 'name'); + * // => ['barney', 'fred'] + */ +function initial(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : callback || n; + } + return slice(array, 0, nativeMin(nativeMax(0, length - n), length)); +} + +module.exports = initial; + +},{"../functions/createCallback":84,"../internals/slice":137}],31:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseIndexOf = require('../internals/baseIndexOf'), + cacheIndexOf = require('../internals/cacheIndexOf'), + createCache = require('../internals/createCache'), + getArray = require('../internals/getArray'), + isArguments = require('../objects/isArguments'), + isArray = require('../objects/isArray'), + largeArraySize = require('../internals/largeArraySize'), + releaseArray = require('../internals/releaseArray'), + releaseObject = require('../internals/releaseObject'); + +/** + * Creates an array of unique values present in all provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of shared values. + * @example + * + * _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2] + */ +function intersection() { + var args = [], + argsIndex = -1, + argsLength = arguments.length, + caches = getArray(), + indexOf = baseIndexOf, + trustIndexOf = indexOf === baseIndexOf, + seen = getArray(); + + while (++argsIndex < argsLength) { + var value = arguments[argsIndex]; + if (isArray(value) || isArguments(value)) { + args.push(value); + caches.push(trustIndexOf && value.length >= largeArraySize && + createCache(argsIndex ? args[argsIndex] : seen)); + } + } + var array = args[0], + index = -1, + length = array ? array.length : 0, + result = []; + + outer: + while (++index < length) { + var cache = caches[0]; + value = array[index]; + + if ((cache ? cacheIndexOf(cache, value) : indexOf(seen, value)) < 0) { + argsIndex = argsLength; + (cache || seen).push(value); + while (--argsIndex) { + cache = caches[argsIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value)) < 0) { + continue outer; + } + } + result.push(value); + } + } + while (argsLength--) { + cache = caches[argsLength]; + if (cache) { + releaseObject(cache); + } + } + releaseArray(caches); + releaseArray(seen); + return result; +} + +module.exports = intersection; + +},{"../internals/baseIndexOf":104,"../internals/cacheIndexOf":109,"../internals/createCache":114,"../internals/getArray":118,"../internals/largeArraySize":124,"../internals/releaseArray":132,"../internals/releaseObject":133,"../objects/isArguments":154,"../objects/isArray":155}],32:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + slice = require('../internals/slice'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max; + +/** + * Gets the last element or last `n` elements of an array. If a callback is + * provided elements at the end of the array are returned as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the last element(s) of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + * + * _.last([1, 2, 3], 2); + * // => [2, 3] + * + * _.last([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [2, 3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.last(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.last(characters, { 'employer': 'na' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ +function last(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[length - 1] : undefined; + } + } + return slice(array, nativeMax(0, length - n)); +} + +module.exports = last; + +},{"../functions/createCallback":84,"../internals/slice":137}],33:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the index at which the last occurrence of `value` is found using strict + * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used + * as the offset from the end of the collection. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); + * // => 4 + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 1 + */ +function lastIndexOf(array, value, fromIndex) { + var index = array ? array.length : 0; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(0, index + fromIndex) : nativeMin(fromIndex, index - 1)) + 1; + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = lastIndexOf; + +},{}],34:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ +var arrayRef = []; + +/** Native method shortcuts */ +var splice = arrayRef.splice; + +/** + * Removes all provided values from the given array using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {...*} [value] 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(array) { + var args = arguments, + argsIndex = 0, + argsLength = args.length, + length = array ? array.length : 0; + + while (++argsIndex < argsLength) { + var index = -1, + value = args[argsIndex]; + while (++index < length) { + if (array[index] === value) { + splice.call(array, index--, 1); + length--; + } + } + } + return array; +} + +module.exports = pull; + +},{}],35:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Native method shortcuts */ +var ceil = Math.ceil; + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max; + +/** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to but not including `end`. If `start` is less than `stop` a + * zero-length range is created unless a negative `step` is specified. + * + * @static + * @memberOf _ + * @category Arrays + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns a new range array. + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ +function range(start, end, step) { + start = +start || 0; + step = typeof step == 'number' ? step : (+step || 1); + + if (end == null) { + end = start; + start = 0; + } + // use `Array(length)` so engines like Chakra and V8 avoid slower modes + // http://youtu.be/XAqIpGU8ZZk#t=17m25s + var index = -1, + length = nativeMax(0, ceil((end - start) / (step || 1))), + result = Array(length); + + while (++index < length) { + result[index] = start; + start += step; + } + return result; +} + +module.exports = range; + +},{}],36:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'); + +/** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ +var arrayRef = []; + +/** Native method shortcuts */ +var splice = arrayRef.splice; + +/** + * Removes all elements from an array that the callback returns truey for + * and returns an array of removed elements. The callback is bound to `thisArg` + * and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4, 5, 6]; + * var evens = _.remove(array, function(num) { return num % 2 == 0; }); + * + * console.log(array); + * // => [1, 3, 5] + * + * console.log(evens); + * // => [2, 4, 6] + */ +function remove(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0, + result = []; + + callback = createCallback(callback, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (callback(value, index, array)) { + result.push(value); + splice.call(array, index--, 1); + length--; + } + } + return result; +} + +module.exports = remove; + +},{"../functions/createCallback":84}],37:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + slice = require('../internals/slice'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max; + +/** + * The opposite of `_.initial` this method gets all but the first element or + * first `n` elements of an array. If a callback function is provided elements + * at the beginning of the array are excluded from the result as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias drop, tail + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + * + * _.rest([1, 2, 3], 2); + * // => [3] + * + * _.rest([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.rest(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.rest(characters, { 'employer': 'slate' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ +function rest(array, callback, thisArg) { + if (typeof callback != 'number' && callback != null) { + var n = 0, + index = -1, + length = array ? array.length : 0; + + callback = createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : nativeMax(0, callback); + } + return slice(array, n); +} + +module.exports = rest; + +},{"../functions/createCallback":84,"../internals/slice":137}],38:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + identity = require('../utilities/identity'); + +/** + * Uses a binary search to determine the smallest index at which a value + * should be inserted into a given sorted array in order to maintain the sort + * order of the array. If a callback is provided it will be executed for + * `value` and each element of `array` to compute their sort ranking. The + * callback is bound to `thisArg` and invoked with one argument; (value). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([20, 30, 50], 40); + * // => 2 + * + * // using "_.pluck" callback shorthand + * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 2 + * + * var dict = { + * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 } + * }; + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return dict.wordToNumber[word]; + * }); + * // => 2 + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return this.wordToNumber[word]; + * }, dict); + * // => 2 + */ +function sortedIndex(array, value, callback, thisArg) { + var low = 0, + high = array ? array.length : low; + + // explicitly reference `identity` for better inlining in Firefox + callback = callback ? createCallback(callback, thisArg, 1) : identity; + value = callback(value); + + while (low < high) { + var mid = (low + high) >>> 1; + (callback(array[mid]) < value) + ? low = mid + 1 + : high = mid; + } + return low; +} + +module.exports = sortedIndex; + +},{"../functions/createCallback":84,"../utilities/identity":183}],39:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseFlatten = require('../internals/baseFlatten'), + baseUniq = require('../internals/baseUniq'); + +/** + * Creates an array of unique values, in order, of the provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of combined values. + * @example + * + * _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2, 3, 5, 4] + */ +function union() { + return baseUniq(baseFlatten(arguments, true, true)); +} + +module.exports = union; + +},{"../internals/baseFlatten":103,"../internals/baseUniq":108}],40:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseUniq = require('../internals/baseUniq'), + createCallback = require('../functions/createCallback'); + +/** + * Creates a duplicate-value-free version of an array using strict equality + * for comparisons, i.e. `===`. If the array is sorted, providing + * `true` for `isSorted` will use a faster algorithm. If a callback is provided + * each element of `array` is passed through the callback before uniqueness + * is computed. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Arrays + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a duplicate-value-free array. + * @example + * + * _.uniq([1, 2, 1, 3, 1]); + * // => [1, 2, 3] + * + * _.uniq([1, 1, 2, 2, 3], true); + * // => [1, 2, 3] + * + * _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); }); + * // => ['A', 'b', 'C'] + * + * _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math); + * // => [1, 2.5, 3] + * + * // using "_.pluck" callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ +function uniq(array, isSorted, callback, thisArg) { + // juggle arguments + if (typeof isSorted != 'boolean' && isSorted != null) { + thisArg = callback; + callback = (typeof isSorted != 'function' && thisArg && thisArg[isSorted] === array) ? null : isSorted; + isSorted = false; + } + if (callback != null) { + callback = createCallback(callback, thisArg, 3); + } + return baseUniq(array, isSorted, callback); +} + +module.exports = uniq; + +},{"../functions/createCallback":84,"../internals/baseUniq":108}],41:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseDifference = require('../internals/baseDifference'), + slice = require('../internals/slice'); + +/** + * Creates an array excluding all provided values using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to filter. + * @param {...*} [value] The values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); + * // => [2, 3, 4] + */ +function without(array) { + return baseDifference(array, slice(arguments, 1)); +} + +module.exports = without; + +},{"../internals/baseDifference":102,"../internals/slice":137}],42:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseDifference = require('../internals/baseDifference'), + baseUniq = require('../internals/baseUniq'), + isArguments = require('../objects/isArguments'), + isArray = require('../objects/isArray'); + +/** + * Creates an array that is the symmetric difference of the provided arrays. + * See http://en.wikipedia.org/wiki/Symmetric_difference. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of values. + * @example + * + * _.xor([1, 2, 3], [5, 2, 1, 4]); + * // => [3, 5, 4] + * + * _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]); + * // => [1, 4, 5] + */ +function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArray(array) || isArguments(array)) { + var result = result + ? baseUniq(baseDifference(result, array).concat(baseDifference(array, result))) + : array; + } + } + return result || []; +} + +module.exports = xor; + +},{"../internals/baseDifference":102,"../internals/baseUniq":108,"../objects/isArguments":154,"../objects/isArray":155}],43:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var max = require('../collections/max'), + pluck = require('../collections/pluck'); + +/** + * 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 _ + * @alias unzip + * @category Arrays + * @param {...Array} [array] Arrays to process. + * @returns {Array} Returns a new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ +function zip() { + var array = arguments.length > 1 ? arguments : arguments[0], + index = -1, + length = array ? max(pluck(array, 'length')) : 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = pluck(array, index); + } + return result; +} + +module.exports = zip; + +},{"../collections/max":65,"../collections/pluck":67}],44:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isArray = require('../objects/isArray'); + +/** + * Creates an object composed from arrays of `keys` and `values`. Provide + * either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` + * or two arrays, one of `keys` and one of corresponding `values`. + * + * @static + * @memberOf _ + * @alias object + * @category Arrays + * @param {Array} keys The array of keys. + * @param {Array} [values=[]] The array of values. + * @returns {Object} Returns an object composed of the given keys and + * corresponding values. + * @example + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ +function zipObject(keys, values) { + var index = -1, + length = keys ? keys.length : 0, + result = {}; + + if (!values && length && !isArray(keys[0])) { + values = []; + } + while (++index < length) { + var key = keys[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; +} + +module.exports = zipObject; + +},{"../objects/isArray":155}],45:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +module.exports = { + 'chain': require('./chaining/chain'), + 'tap': require('./chaining/tap'), + 'value': require('./chaining/wrapperValueOf'), + 'wrapperChain': require('./chaining/wrapperChain'), + 'wrapperToString': require('./chaining/wrapperToString'), + 'wrapperValueOf': require('./chaining/wrapperValueOf') +}; + +},{"./chaining/chain":46,"./chaining/tap":47,"./chaining/wrapperChain":48,"./chaining/wrapperToString":49,"./chaining/wrapperValueOf":50}],46:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var lodashWrapper = require('../internals/lodashWrapper'); + +/** + * Creates a `lodash` object that wraps the given value with explicit + * method chaining enabled. + * + * @static + * @memberOf _ + * @category Chaining + * @param {*} value The value to wrap. + * @returns {Object} Returns the wrapper object. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _.chain(characters) + * .sortBy('age') + * .map(function(chr) { return chr.name + ' is ' + chr.age; }) + * .first() + * .value(); + * // => 'pebbles is 1' + */ +function chain(value) { + value = new lodashWrapper(value); + value.__chain__ = true; + return value; +} + +module.exports = chain; + +},{"../internals/lodashWrapper":125}],47:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Invokes `interceptor` with the `value` as the first argument and then + * returns `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 Chaining + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3, 4]) + * .tap(function(array) { array.pop(); }) + * .reverse() + * .value(); + * // => [3, 2, 1] + */ +function tap(value, interceptor) { + interceptor(value); + return value; +} + +module.exports = tap; + +},{}],48:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Enables explicit method chaining on the wrapper object. + * + * @name chain + * @memberOf _ + * @category Chaining + * @returns {*} Returns the wrapper object. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // without explicit chaining + * _(characters).first(); + * // => { 'name': 'barney', 'age': 36 } + * + * // with explicit chaining + * _(characters).chain() + * .first() + * .pick('age') + * .value(); + * // => { 'age': 36 } + */ +function wrapperChain() { + this.__chain__ = true; + return this; +} + +module.exports = wrapperChain; + +},{}],49:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Produces the `toString` result of the wrapped value. + * + * @name toString + * @memberOf _ + * @category Chaining + * @returns {string} Returns the string result. + * @example + * + * _([1, 2, 3]).toString(); + * // => '1,2,3' + */ +function wrapperToString() { + return String(this.__wrapped__); +} + +module.exports = wrapperToString; + +},{}],50:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var forEach = require('../collections/forEach'), + support = require('../support'); + +/** + * Extracts the wrapped value. + * + * @name valueOf + * @memberOf _ + * @alias value + * @category Chaining + * @returns {*} Returns the wrapped value. + * @example + * + * _([1, 2, 3]).valueOf(); + * // => [1, 2, 3] + */ +function wrapperValueOf() { + return this.__wrapped__; +} + +module.exports = wrapperValueOf; + +},{"../collections/forEach":59,"../support":179}],51:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +module.exports = { + 'all': require('./collections/every'), + 'any': require('./collections/some'), + 'at': require('./collections/at'), + 'collect': require('./collections/map'), + 'contains': require('./collections/contains'), + 'countBy': require('./collections/countBy'), + 'detect': require('./collections/find'), + 'each': require('./collections/forEach'), + 'eachRight': require('./collections/forEachRight'), + 'every': require('./collections/every'), + 'filter': require('./collections/filter'), + 'find': require('./collections/find'), + 'findLast': require('./collections/findLast'), + 'findWhere': require('./collections/find'), + 'foldl': require('./collections/reduce'), + 'foldr': require('./collections/reduceRight'), + 'forEach': require('./collections/forEach'), + 'forEachRight': require('./collections/forEachRight'), + 'groupBy': require('./collections/groupBy'), + 'include': require('./collections/contains'), + 'indexBy': require('./collections/indexBy'), + 'inject': require('./collections/reduce'), + 'invoke': require('./collections/invoke'), + 'map': require('./collections/map'), + 'max': require('./collections/max'), + 'min': require('./collections/min'), + 'pluck': require('./collections/pluck'), + 'reduce': require('./collections/reduce'), + 'reduceRight': require('./collections/reduceRight'), + 'reject': require('./collections/reject'), + 'sample': require('./collections/sample'), + 'select': require('./collections/filter'), + 'shuffle': require('./collections/shuffle'), + 'size': require('./collections/size'), + 'some': require('./collections/some'), + 'sortBy': require('./collections/sortBy'), + 'toArray': require('./collections/toArray'), + 'where': require('./collections/where') +}; + +},{"./collections/at":52,"./collections/contains":53,"./collections/countBy":54,"./collections/every":55,"./collections/filter":56,"./collections/find":57,"./collections/findLast":58,"./collections/forEach":59,"./collections/forEachRight":60,"./collections/groupBy":61,"./collections/indexBy":62,"./collections/invoke":63,"./collections/map":64,"./collections/max":65,"./collections/min":66,"./collections/pluck":67,"./collections/reduce":68,"./collections/reduceRight":69,"./collections/reject":70,"./collections/sample":71,"./collections/shuffle":72,"./collections/size":73,"./collections/some":74,"./collections/sortBy":75,"./collections/toArray":76,"./collections/where":77}],52:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseFlatten = require('../internals/baseFlatten'), + isString = require('../objects/isString'); + +/** + * Creates an array of elements from the specified indexes, or keys, of the + * `collection`. Indexes may be specified as individual arguments or as arrays + * of indexes. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [index] The indexes of `collection` + * to retrieve, specified as individual indexes or arrays of indexes. + * @returns {Array} Returns a new array of elements corresponding to the + * provided indexes. + * @example + * + * _.at(['a', 'b', 'c', 'd', 'e'], [0, 2, 4]); + * // => ['a', 'c', 'e'] + * + * _.at(['fred', 'barney', 'pebbles'], 0, 2); + * // => ['fred', 'pebbles'] + */ +function at(collection) { + var args = arguments, + index = -1, + props = baseFlatten(args, true, false, 1), + length = (args[2] && args[2][args[1]] === collection) ? 1 : props.length, + result = Array(length); + + while(++index < length) { + result[index] = collection[props[index]]; + } + return result; +} + +module.exports = at; + +},{"../internals/baseFlatten":103,"../objects/isString":169}],53:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseIndexOf = require('../internals/baseIndexOf'), + forOwn = require('../objects/forOwn'), + isArray = require('../objects/isArray'), + isString = require('../objects/isString'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max; + +/** + * Checks if a given value is present in a collection using strict equality + * for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the + * offset from the end of the collection. + * + * @static + * @memberOf _ + * @alias include + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {*} target The value to check for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {boolean} Returns `true` if the `target` element is found, else `false`. + * @example + * + * _.contains([1, 2, 3], 1); + * // => true + * + * _.contains([1, 2, 3], 1, 2); + * // => false + * + * _.contains({ 'name': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.contains('pebbles', 'eb'); + * // => true + */ +function contains(collection, target, fromIndex) { + var index = -1, + indexOf = baseIndexOf, + length = collection ? collection.length : 0, + result = false; + + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0; + if (isArray(collection)) { + result = indexOf(collection, target, fromIndex) > -1; + } else if (typeof length == 'number') { + result = (isString(collection) ? collection.indexOf(target, fromIndex) : indexOf(collection, target, fromIndex)) > -1; + } else { + forOwn(collection, function(value) { + if (++index >= fromIndex) { + return !(result = value === target); + } + }); + } + return result; +} + +module.exports = contains; + +},{"../internals/baseIndexOf":104,"../objects/forOwn":149,"../objects/isArray":155,"../objects/isString":169}],54:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createAggregator = require('../internals/createAggregator'); + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Native method shortcuts */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through the callback. The corresponding value + * of each key is the number of times the key was returned by the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return this.floor(num); }, 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; + +},{"../internals/createAggregator":113}],55:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + forOwn = require('../objects/forOwn'); + +/** + * Checks if the given callback returns truey value for **all** elements of + * a collection. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if all elements passed the callback check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes']); + * // => false + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.every(characters, 'age'); + * // => true + * + * // using "_.where" callback shorthand + * _.every(characters, { 'age': 36 }); + * // => false + */ +function every(collection, callback, thisArg) { + var result = true; + callback = createCallback(callback, thisArg, 3); + + var index = -1, + length = collection ? collection.length : 0; + + if (typeof length == 'number') { + while (++index < length) { + if (!(result = !!callback(collection[index], index, collection))) { + break; + } + } + } else { + forOwn(collection, function(value, index, collection) { + return (result = !!callback(value, index, collection)); + }); + } + return result; +} + +module.exports = every; + +},{"../functions/createCallback":84,"../objects/forOwn":149}],56:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + forOwn = require('../objects/forOwn'); + +/** + * Iterates over elements of a collection, returning an array of all elements + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that passed the callback check. + * @example + * + * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [2, 4, 6] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.filter(characters, 'blocked'); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + * + * // using "_.where" callback shorthand + * _.filter(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + */ +function filter(collection, callback, thisArg) { + var result = []; + callback = createCallback(callback, thisArg, 3); + + var index = -1, + length = collection ? collection.length : 0; + + if (typeof length == 'number') { + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + result.push(value); + } + } + } else { + forOwn(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result.push(value); + } + }); + } + return result; +} + +module.exports = filter; + +},{"../functions/createCallback":84,"../objects/forOwn":149}],57:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + forOwn = require('../objects/forOwn'); + +/** + * Iterates over elements of a collection, returning the first element that + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias detect, findWhere + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.find(characters, function(chr) { + * return chr.age < 40; + * }); + * // => { 'name': 'barney', 'age': 36, 'blocked': false } + * + * // using "_.where" callback shorthand + * _.find(characters, { 'age': 1 }); + * // => { 'name': 'pebbles', 'age': 1, 'blocked': false } + * + * // using "_.pluck" callback shorthand + * _.find(characters, 'blocked'); + * // => { 'name': 'fred', 'age': 40, 'blocked': true } + */ +function find(collection, callback, thisArg) { + callback = createCallback(callback, thisArg, 3); + + var index = -1, + length = collection ? collection.length : 0; + + if (typeof length == 'number') { + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + return value; + } + } + } else { + var result; + forOwn(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } +} + +module.exports = find; + +},{"../functions/createCallback":84,"../objects/forOwn":149}],58:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + forEachRight = require('./forEachRight'); + +/** + * This method is like `_.find` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(num) { + * return num % 2 == 1; + * }); + * // => 3 + */ +function findLast(collection, callback, thisArg) { + var result; + callback = createCallback(callback, thisArg, 3); + forEachRight(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; +} + +module.exports = findLast; + +},{"../functions/createCallback":84,"./forEachRight":60}],59:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + forOwn = require('../objects/forOwn'); + +/** + * Iterates over elements of a collection, executing the callback for each + * element. The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). Callbacks 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 Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); + * // => logs each number and returns '1,2,3' + * + * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); }); + * // => logs each number and returns the object (property order is not guaranteed across environments) + */ +function forEach(collection, callback, thisArg) { + var index = -1, + length = collection ? collection.length : 0; + + callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3); + if (typeof length == 'number') { + while (++index < length) { + if (callback(collection[index], index, collection) === false) { + break; + } + } + } else { + forOwn(collection, callback); + } + return collection; +} + +module.exports = forEach; + +},{"../internals/baseCreateCallback":100,"../objects/forOwn":149}],60:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + forOwn = require('../objects/forOwn'), + isArray = require('../objects/isArray'), + isString = require('../objects/isString'), + keys = require('../objects/keys'); + +/** + * This method is like `_.forEach` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); + * // => logs each number from right to left and returns '3,2,1' + */ +function forEachRight(collection, callback, thisArg) { + var length = collection ? collection.length : 0; + callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3); + if (typeof length == 'number') { + while (length--) { + if (callback(collection[length], length, collection) === false) { + break; + } + } + } else { + var props = keys(collection); + length = props.length; + forOwn(collection, function(value, key, collection) { + key = props ? props[--length] : --length; + return callback(collection[key], key, collection); + }); + } + return collection; +} + +module.exports = forEachRight; + +},{"../internals/baseCreateCallback":100,"../objects/forOwn":149,"../objects/isArray":155,"../objects/isString":169,"../objects/keys":171}],61:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createAggregator = require('../internals/createAggregator'); + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Native method shortcuts */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of a collection through the callback. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false` + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using "_.pluck" callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ +var groupBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value); +}); + +module.exports = groupBy; + +},{"../internals/createAggregator":113}],62:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createAggregator = require('../internals/createAggregator'); + +/** + * Creates an object composed of keys generated from the results of running + * each element of the collection through the given callback. The corresponding + * value of each key is the last element responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keys = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keys, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keys, function(key) { return String.fromCharCode(key.code); }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(characters, function(key) { this.fromCharCode(key.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; + +},{"../internals/createAggregator":113}],63:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var forEach = require('./forEach'), + slice = require('../internals/slice'); + +/** + * Invokes the method named by `methodName` on each element in the `collection` + * returning an array of the results of each invoked method. Additional arguments + * will be provided to each invoked method. If `methodName` is a function it + * will be invoked for, and `this` bound to, each element in the `collection`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|string} methodName The name of the method to invoke or + * the function invoked per iteration. + * @param {...*} [arg] Arguments to invoke the method with. + * @returns {Array} Returns a new array of the results of each invoked method. + * @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']] + */ +function invoke(collection, methodName) { + var args = slice(arguments, 2), + index = -1, + isFunc = typeof methodName == 'function', + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args); + }); + return result; +} + +module.exports = invoke; + +},{"../internals/slice":137,"./forEach":59}],64:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + forOwn = require('../objects/forOwn'); + +/** + * Creates an array of values by running each element in the collection + * through the callback. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias collect + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of the results of each `callback` execution. + * @example + * + * _.map([1, 2, 3], function(num) { return num * 3; }); + * // => [3, 6, 9] + * + * _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; }); + * // => [3, 6, 9] (property order is not guaranteed across environments) + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(characters, 'name'); + * // => ['barney', 'fred'] + */ +function map(collection, callback, thisArg) { + var index = -1, + length = collection ? collection.length : 0; + + callback = createCallback(callback, thisArg, 3); + if (typeof length == 'number') { + var result = Array(length); + while (++index < length) { + result[index] = callback(collection[index], index, collection); + } + } else { + result = []; + forOwn(collection, function(value, key, collection) { + result[++index] = callback(value, key, collection); + }); + } + return result; +} + +module.exports = map; + +},{"../functions/createCallback":84,"../objects/forOwn":149}],65:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var charAtCallback = require('../internals/charAtCallback'), + createCallback = require('../functions/createCallback'), + forEach = require('./forEach'), + forOwn = require('../objects/forOwn'), + isArray = require('../objects/isArray'), + isString = require('../objects/isString'); + +/** + * Retrieves the maximum value of a collection. If the collection is empty or + * falsey `-Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.max(characters, function(chr) { return chr.age; }); + * // => { 'name': 'fred', 'age': 40 }; + * + * // using "_.pluck" callback shorthand + * _.max(characters, 'age'); + * // => { 'name': 'fred', 'age': 40 }; + */ +function max(collection, callback, thisArg) { + var computed = -Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value > result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : createCallback(callback, thisArg, 3); + + forEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current > computed) { + computed = current; + result = value; + } + }); + } + return result; +} + +module.exports = max; + +},{"../functions/createCallback":84,"../internals/charAtCallback":111,"../objects/forOwn":149,"../objects/isArray":155,"../objects/isString":169,"./forEach":59}],66:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var charAtCallback = require('../internals/charAtCallback'), + createCallback = require('../functions/createCallback'), + forEach = require('./forEach'), + forOwn = require('../objects/forOwn'), + isArray = require('../objects/isArray'), + isString = require('../objects/isString'); + +/** + * Retrieves the minimum value of a collection. If the collection is empty or + * falsey `Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.min(characters, function(chr) { return chr.age; }); + * // => { 'name': 'barney', 'age': 36 }; + * + * // using "_.pluck" callback shorthand + * _.min(characters, 'age'); + * // => { 'name': 'barney', 'age': 36 }; + */ +function min(collection, callback, thisArg) { + var computed = Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value < result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : createCallback(callback, thisArg, 3); + + forEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current < computed) { + computed = current; + result = value; + } + }); + } + return result; +} + +module.exports = min; + +},{"../functions/createCallback":84,"../internals/charAtCallback":111,"../objects/forOwn":149,"../objects/isArray":155,"../objects/isString":169,"./forEach":59}],67:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var map = require('./map'); + +/** + * Retrieves the value of a specified property from all elements in the collection. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {string} property The name of the property to pluck. + * @returns {Array} Returns a new array of property values. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.pluck(characters, 'name'); + * // => ['barney', 'fred'] + */ +var pluck = map; + +module.exports = pluck; + +},{"./map":64}],68:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + forOwn = require('../objects/forOwn'); + +/** + * Reduces a collection to a value which is the accumulated result of running + * each element in the collection through the callback, where each successive + * callback execution consumes the return value of the previous execution. If + * `accumulator` is not provided the first element of the collection will be + * used as the initial `accumulator` value. The callback is bound to `thisArg` + * and invoked with four arguments; (accumulator, value, index|key, collection). + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var sum = _.reduce([1, 2, 3], function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ +function reduce(collection, callback, accumulator, thisArg) { + if (!collection) return accumulator; + var noaccum = arguments.length < 3; + callback = createCallback(callback, thisArg, 4); + + var index = -1, + length = collection.length; + + if (typeof length == 'number') { + if (noaccum) { + accumulator = collection[++index]; + } + while (++index < length) { + accumulator = callback(accumulator, collection[index], index, collection); + } + } else { + forOwn(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection) + }); + } + return accumulator; +} + +module.exports = reduce; + +},{"../functions/createCallback":84,"../objects/forOwn":149}],69:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + forEachRight = require('./forEachRight'); + +/** + * This method is like `_.reduce` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var list = [[0, 1], [2, 3], [4, 5]]; + * var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []); + * // => [4, 5, 2, 3, 0, 1] + */ +function reduceRight(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = createCallback(callback, thisArg, 4); + forEachRight(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection); + }); + return accumulator; +} + +module.exports = reduceRight; + +},{"../functions/createCallback":84,"./forEachRight":60}],70:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + filter = require('./filter'); + +/** + * The opposite of `_.filter` this method returns the elements of a + * collection that the callback does **not** return truey for. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that failed the callback check. + * @example + * + * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [1, 3, 5] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.reject(characters, 'blocked'); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + * + * // using "_.where" callback shorthand + * _.reject(characters, { 'age': 36 }); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + */ +function reject(collection, callback, thisArg) { + callback = createCallback(callback, thisArg, 3); + return filter(collection, function(value, index, collection) { + return !callback(value, index, collection); + }); +} + +module.exports = reject; + +},{"../functions/createCallback":84,"./filter":56}],71:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseRandom = require('../internals/baseRandom'), + isString = require('../objects/isString'), + shuffle = require('./shuffle'), + values = require('../objects/values'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Retrieves a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Allows working with functions like `_.map` + * without using their `index` arguments as `n`. + * @returns {Array} Returns the random sample(s) of `collection`. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ +function sample(collection, n, guard) { + if (collection && typeof collection.length != 'number') { + collection = values(collection); + } + if (n == null || guard) { + return collection ? collection[baseRandom(0, collection.length - 1)] : undefined; + } + var result = shuffle(collection); + result.length = nativeMin(nativeMax(0, n), result.length); + return result; +} + +module.exports = sample; + +},{"../internals/baseRandom":107,"../objects/isString":169,"../objects/values":178,"./shuffle":72}],72:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseRandom = require('../internals/baseRandom'), + forEach = require('./forEach'); + +/** + * Creates an array of shuffled values, using a version of the Fisher-Yates + * shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns a new shuffled collection. + * @example + * + * _.shuffle([1, 2, 3, 4, 5, 6]); + * // => [4, 1, 6, 3, 5, 2] + */ +function shuffle(collection) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + var rand = baseRandom(0, ++index); + result[index] = result[rand]; + result[rand] = value; + }); + return result; +} + +module.exports = shuffle; + +},{"../internals/baseRandom":107,"./forEach":59}],73:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var keys = require('../objects/keys'); + +/** + * Gets the size of the `collection` by returning `collection.length` for arrays + * and array-like objects or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns `collection.length` or number of own enumerable properties. + * @example + * + * _.size([1, 2]); + * // => 2 + * + * _.size({ 'one': 1, 'two': 2, 'three': 3 }); + * // => 3 + * + * _.size('pebbles'); + * // => 7 + */ +function size(collection) { + var length = collection ? collection.length : 0; + return typeof length == 'number' ? length : keys(collection).length; +} + +module.exports = size; + +},{"../objects/keys":171}],74:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + forOwn = require('../objects/forOwn'), + isArray = require('../objects/isArray'); + +/** + * Checks if the callback returns a truey value for **any** element of a + * collection. The function returns as soon as it finds a passing value and + * does not iterate over the entire collection. The callback is bound to + * `thisArg` and invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if any element passed the callback check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.some(characters, 'blocked'); + * // => true + * + * // using "_.where" callback shorthand + * _.some(characters, { 'age': 1 }); + * // => false + */ +function some(collection, callback, thisArg) { + var result; + callback = createCallback(callback, thisArg, 3); + + var index = -1, + length = collection ? collection.length : 0; + + if (typeof length == 'number') { + while (++index < length) { + if ((result = callback(collection[index], index, collection))) { + break; + } + } + } else { + forOwn(collection, function(value, index, collection) { + return !(result = callback(value, index, collection)); + }); + } + return !!result; +} + +module.exports = some; + +},{"../functions/createCallback":84,"../objects/forOwn":149,"../objects/isArray":155}],75:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var compareAscending = require('../internals/compareAscending'), + createCallback = require('../functions/createCallback'), + forEach = require('./forEach'), + getArray = require('../internals/getArray'), + getObject = require('../internals/getObject'), + isArray = require('../objects/isArray'), + map = require('./map'), + releaseArray = require('../internals/releaseArray'), + releaseObject = require('../internals/releaseObject'); + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through the callback. This method + * performs a stable sort, that is, it will preserve the original sort order + * of equal elements. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an array of property names is provided for `callback` the collection + * will be sorted by each property value. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of sorted elements. + * @example + * + * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(num) { return this.sin(num); }, Math); + * // => [3, 1, 2] + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 26 }, + * { 'name': 'fred', 'age': 30 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(_.sortBy(characters, 'age'), _.values); + * // => [['barney', 26], ['fred', 30], ['barney', 36], ['fred', 40]] + * + * // sorting by multiple properties + * _.map(_.sortBy(characters, ['name', 'age']), _.values); + * // = > [['barney', 26], ['barney', 36], ['fred', 30], ['fred', 40]] + */ +function sortBy(collection, callback, thisArg) { + var index = -1, + isArr = isArray(callback), + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + if (!isArr) { + callback = createCallback(callback, thisArg, 3); + } + forEach(collection, function(value, key, collection) { + var object = result[++index] = getObject(); + if (isArr) { + object.criteria = map(callback, function(key) { return value[key]; }); + } else { + (object.criteria = getArray())[0] = callback(value, key, collection); + } + object.index = index; + object.value = value; + }); + + length = result.length; + result.sort(compareAscending); + while (length--) { + var object = result[length]; + result[length] = object.value; + if (!isArr) { + releaseArray(object.criteria); + } + releaseObject(object); + } + return result; +} + +module.exports = sortBy; + +},{"../functions/createCallback":84,"../internals/compareAscending":112,"../internals/getArray":118,"../internals/getObject":119,"../internals/releaseArray":132,"../internals/releaseObject":133,"../objects/isArray":155,"./forEach":59,"./map":64}],76:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isString = require('../objects/isString'), + slice = require('../internals/slice'), + values = require('../objects/values'); + +/** + * Converts the `collection` to an array. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to convert. + * @returns {Array} Returns the new converted array. + * @example + * + * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); + * // => [2, 3, 4] + */ +function toArray(collection) { + if (collection && typeof collection.length == 'number') { + return slice(collection); + } + return values(collection); +} + +module.exports = toArray; + +},{"../internals/slice":137,"../objects/isString":169,"../objects/values":178}],77:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var filter = require('./filter'); + +/** + * Performs a deep comparison of each element in a `collection` to the given + * `properties` object, returning an array of all elements that have equivalent + * property values. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Object} props The object of property values to filter by. + * @returns {Array} Returns a new array of elements that have the given properties. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.where(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }] + * + * _.where(characters, { 'pets': ['dino'] }); + * // => [{ 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] }] + */ +var where = filter; + +module.exports = where; + +},{"./filter":56}],78:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +module.exports = { + 'after': require('./functions/after'), + 'bind': require('./functions/bind'), + 'bindAll': require('./functions/bindAll'), + 'bindKey': require('./functions/bindKey'), + 'compose': require('./functions/compose'), + 'createCallback': require('./functions/createCallback'), + 'curry': require('./functions/curry'), + 'debounce': require('./functions/debounce'), + 'defer': require('./functions/defer'), + 'delay': require('./functions/delay'), + 'memoize': require('./functions/memoize'), + 'once': require('./functions/once'), + 'partial': require('./functions/partial'), + 'partialRight': require('./functions/partialRight'), + 'throttle': require('./functions/throttle'), + 'wrap': require('./functions/wrap') +}; + +},{"./functions/after":79,"./functions/bind":80,"./functions/bindAll":81,"./functions/bindKey":82,"./functions/compose":83,"./functions/createCallback":84,"./functions/curry":85,"./functions/debounce":86,"./functions/defer":87,"./functions/delay":88,"./functions/memoize":89,"./functions/once":90,"./functions/partial":91,"./functions/partialRight":92,"./functions/throttle":93,"./functions/wrap":94}],79:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isFunction = require('../objects/isFunction'); + +/** + * Creates a function that executes `func`, with the `this` binding and + * arguments of the created function, only after being called `n` times. + * + * @static + * @memberOf _ + * @category Functions + * @param {number} n The number of times the function must be called before + * `func` is executed. + * @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 all saves have completed + */ +function after(n, func) { + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; +} + +module.exports = after; + +},{"../objects/isFunction":162}],80:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createWrapper = require('../internals/createWrapper'), + slice = require('../internals/slice'); + +/** + * Creates a function that, when called, invokes `func` with the `this` + * binding of `thisArg` and prepends any additional `bind` arguments to those + * provided to the bound function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var func = function(greeting) { + * return greeting + ' ' + this.name; + * }; + * + * func = _.bind(func, { 'name': 'fred' }, 'hi'); + * func(); + * // => 'hi fred' + */ +function bind(func, thisArg) { + return arguments.length > 2 + ? createWrapper(func, 17, slice(arguments, 2), null, thisArg) + : createWrapper(func, 1, null, null, thisArg); +} + +module.exports = bind; + +},{"../internals/createWrapper":115,"../internals/slice":137}],81:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseFlatten = require('../internals/baseFlatten'), + createWrapper = require('../internals/createWrapper'), + functions = require('../objects/functions'); + +/** + * 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 the function properties + * of `object` will be bound. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...string} [methodName] 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 button is clicked + */ +function bindAll(object) { + var funcs = arguments.length > 1 ? baseFlatten(arguments, true, false, 1) : functions(object), + index = -1, + length = funcs.length; + + while (++index < length) { + var key = funcs[index]; + object[key] = createWrapper(object[key], 1, null, null, object); + } + return object; +} + +module.exports = bindAll; + +},{"../internals/baseFlatten":103,"../internals/createWrapper":115,"../objects/functions":151}],82:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createWrapper = require('../internals/createWrapper'), + slice = require('../internals/slice'); + +/** + * Creates a function that, when called, 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 will be redefined or don't yet exist. + * See http://michaux.ca/articles/lazy-function-definition-pattern. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'name': 'fred', + * 'greet': function(greeting) { + * return greeting + ' ' + this.name; + * } + * }; + * + * var func = _.bindKey(object, 'greet', 'hi'); + * func(); + * // => 'hi fred' + * + * object.greet = function(greeting) { + * return greeting + 'ya ' + this.name + '!'; + * }; + * + * func(); + * // => 'hiya fred!' + */ +function bindKey(object, key) { + return arguments.length > 2 + ? createWrapper(key, 19, slice(arguments, 2), null, object) + : createWrapper(key, 3, null, null, object); +} + +module.exports = bindKey; + +},{"../internals/createWrapper":115,"../internals/slice":137}],83:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isFunction = require('../objects/isFunction'); + +/** + * Creates a function that is the composition of the provided functions, + * where each function consumes the return value of the function that follows. + * For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. + * Each function is executed with the `this` binding of the composed function. + * + * @static + * @memberOf _ + * @category Functions + * @param {...Function} [func] Functions to compose. + * @returns {Function} Returns the new composed function. + * @example + * + * var realNameMap = { + * 'pebbles': 'penelope' + * }; + * + * var format = function(name) { + * name = realNameMap[name.toLowerCase()] || name; + * return name.charAt(0).toUpperCase() + name.slice(1).toLowerCase(); + * }; + * + * var greet = function(formatted) { + * return 'Hiya ' + formatted + '!'; + * }; + * + * var welcome = _.compose(greet, format); + * welcome('pebbles'); + * // => 'Hiya Penelope!' + */ +function compose() { + var funcs = arguments, + length = funcs.length; + + while (length--) { + if (!isFunction(funcs[length])) { + throw new TypeError; + } + } + return function() { + var args = arguments, + length = funcs.length; + + while (length--) { + args = [funcs[length].apply(this, args)]; + } + return args[0]; + }; +} + +module.exports = compose; + +},{"../objects/isFunction":162}],84:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + baseIsEqual = require('../internals/baseIsEqual'), + isObject = require('../objects/isObject'), + keys = require('../objects/keys'), + property = require('../utilities/property'); + +/** + * Produces a callback bound to an optional `thisArg`. If `func` is a property + * name the created callback will return the property value for a given element. + * If `func` is an object the created callback will return `true` for elements + * that contain the equivalent object properties, otherwise it will return `false`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // wrap to create custom callback shorthands + * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) { + * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback); + * return !match ? func(callback, thisArg) : function(object) { + * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3]; + * }; + * }); + * + * _.filter(characters, 'age__gt38'); + * // => [{ 'name': 'fred', 'age': 40 }] + */ +function createCallback(func, thisArg, argCount) { + var type = typeof func; + if (func == null || type == 'function') { + return baseCreateCallback(func, thisArg, argCount); + } + // handle "_.pluck" style callback shorthands + if (type != 'object') { + return property(func); + } + var props = keys(func), + key = props[0], + a = func[key]; + + // handle "_.where" style callback shorthands + if (props.length == 1 && a === a && !isObject(a)) { + // fast path the common case of providing an object with a single + // property containing a primitive value + return function(object) { + var b = object[key]; + return a === b && (a !== 0 || (1 / a == 1 / b)); + }; + } + return function(object) { + var length = props.length, + result = false; + + while (length--) { + if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) { + break; + } + } + return result; + }; +} + +module.exports = createCallback; + +},{"../internals/baseCreateCallback":100,"../internals/baseIsEqual":105,"../objects/isObject":166,"../objects/keys":171,"../utilities/property":189}],85:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createWrapper = require('../internals/createWrapper'); + +/** + * Creates a function which accepts one or more arguments of `func` that when + * invoked either executes `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` can be specified + * if `func.length` is not sufficient. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @returns {Function} Returns the new curried function. + * @example + * + * var curried = _.curry(function(a, b, c) { + * console.log(a + b + c); + * }); + * + * curried(1)(2)(3); + * // => 6 + * + * curried(1, 2)(3); + * // => 6 + * + * curried(1, 2, 3); + * // => 6 + */ +function curry(func, arity) { + arity = typeof arity == 'number' ? arity : (+arity || func.length); + return createWrapper(func, 4, null, null, null, arity); +} + +module.exports = curry; + +},{"../internals/createWrapper":115}],86:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isFunction = require('../objects/isFunction'), + isObject = require('../objects/isObject'), + now = require('../utilities/now'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max; + +/** + * Creates a function that will delay the execution of `func` until after + * `wait` milliseconds have elapsed since the last time it was invoked. + * 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 will return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to debounce. + * @param {number} wait The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called. + * @param {boolean} [options.trailing=true] Specify execution 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 + * var lazyLayout = _.debounce(calculateLayout, 150); + * jQuery(window).on('resize', lazyLayout); + * + * // execute `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * }); + * + * // ensure `batchLog` is executed once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * source.addEventListener('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * }, false); + */ +function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + wait = nativeMax(0, wait) || 0; + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = options.leading; + maxWait = 'maxWait' in options && (nativeMax(wait, options.maxWait) || 0); + trailing = 'trailing' in options ? options.trailing : trailing; + } + var delayed = function() { + var remaining = wait - (now() - stamp); + if (remaining <= 0) { + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + var isCalled = trailingCall; + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + } else { + timeoutId = setTimeout(delayed, remaining); + } + }; + + var maxDelayed = function() { + if (timeoutId) { + clearTimeout(timeoutId); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (trailing || (maxWait !== wait)) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + }; + + return function() { + 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; + + 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 = null; + } + return result; + }; +} + +module.exports = debounce; + +},{"../objects/isFunction":162,"../objects/isObject":166,"../utilities/now":187}],87:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isFunction = require('../objects/isFunction'), + slice = require('../internals/slice'); + +/** + * Defers executing the `func` function until the current call stack has cleared. + * Additional arguments will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to defer. + * @param {...*} [arg] 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 + */ +function defer(func) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 1); + return setTimeout(function() { func.apply(undefined, args); }, 1); +} + +module.exports = defer; + +},{"../internals/slice":137,"../objects/isFunction":162}],88:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isFunction = require('../objects/isFunction'), + slice = require('../internals/slice'); + +/** + * Executes the `func` function after `wait` milliseconds. Additional arguments + * will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay execution. + * @param {...*} [arg] 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 + */ +function delay(func, wait) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 2); + return setTimeout(function() { func.apply(undefined, args); }, wait); +} + +module.exports = delay; + +},{"../internals/slice":137,"../objects/isFunction":162}],89:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isFunction = require('../objects/isFunction'), + keyPrefix = require('../internals/keyPrefix'); + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Native method shortcuts */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it will be used to determine 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 used as the cache key. + * The `func` is executed with the `this` binding of the memoized function. + * The result cache is exposed as the `cache` property on the memoized function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] A function used to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var fibonacci = _.memoize(function(n) { + * return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); + * }); + * + * fibonacci(9) + * // => 34 + * + * var data = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // modifying the result cache + * var get = _.memoize(function(name) { return data[name]; }, _.identity); + * get('pebbles'); + * // => { 'name': 'pebbles', 'age': 1 } + * + * get.cache.pebbles.name = 'penelope'; + * get('pebbles'); + * // => { 'name': 'penelope', 'age': 1 } + */ +function memoize(func, resolver) { + if (!isFunction(func)) { + throw new TypeError; + } + var memoized = function() { + var cache = memoized.cache, + key = resolver ? resolver.apply(this, arguments) : keyPrefix + arguments[0]; + + return hasOwnProperty.call(cache, key) + ? cache[key] + : (cache[key] = func.apply(this, arguments)); + } + memoized.cache = {}; + return memoized; +} + +module.exports = memoize; + +},{"../internals/keyPrefix":123,"../objects/isFunction":162}],90:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isFunction = require('../objects/isFunction'); + +/** + * Creates a function that is restricted to execute `func` once. Repeat calls to + * the function will return the value of the first call. The `func` is executed + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` executes `createApplication` once + */ +function once(func) { + var ran, + result; + + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (ran) { + return result; + } + ran = true; + result = func.apply(this, arguments); + + // clear the `func` variable so the function may be garbage collected + func = null; + return result; + }; +} + +module.exports = once; + +},{"../objects/isFunction":162}],91:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createWrapper = require('../internals/createWrapper'), + slice = require('../internals/slice'); + +/** + * Creates a function that, when called, invokes `func` with any additional + * `partial` arguments prepended to those provided to the new function. This + * method is similar to `_.bind` except it does **not** alter the `this` binding. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { return greeting + ' ' + name; }; + * var hi = _.partial(greet, 'hi'); + * hi('fred'); + * // => 'hi fred' + */ +function partial(func) { + return createWrapper(func, 16, slice(arguments, 1)); +} + +module.exports = partial; + +},{"../internals/createWrapper":115,"../internals/slice":137}],92:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createWrapper = require('../internals/createWrapper'), + slice = require('../internals/slice'); + +/** + * This method is like `_.partial` except that `partial` arguments are + * appended to those provided to the new function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var defaultsDeep = _.partialRight(_.merge, _.defaults); + * + * var options = { + * 'variable': 'data', + * 'imports': { 'jq': $ } + * }; + * + * defaultsDeep(options, _.templateSettings); + * + * options.variable + * // => 'data' + * + * options.imports + * // => { '_': _, 'jq': $ } + */ +function partialRight(func) { + return createWrapper(func, 32, null, slice(arguments, 1)); +} + +module.exports = partialRight; + +},{"../internals/createWrapper":115,"../internals/slice":137}],93:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var debounce = require('./debounce'), + isFunction = require('../objects/isFunction'), + isObject = require('../objects/isObject'); + +/** Used as an internal `_.debounce` options object */ +var debounceOptions = { + 'leading': false, + 'maxWait': 0, + 'trailing': false +}; + +/** + * Creates a function that, when executed, will only call the `func` function + * at most once per every `wait` milliseconds. 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 will + * return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to throttle. + * @param {number} wait The number of milliseconds to throttle executions to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * var throttled = _.throttle(updatePosition, 100); + * jQuery(window).on('scroll', throttled); + * + * // execute `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + */ +function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? options.leading : leading; + trailing = 'trailing' in options ? options.trailing : trailing; + } + debounceOptions.leading = leading; + debounceOptions.maxWait = wait; + debounceOptions.trailing = trailing; + + return debounce(func, wait, debounceOptions); +} + +module.exports = throttle; + +},{"../objects/isFunction":162,"../objects/isObject":166,"./debounce":86}],94:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createWrapper = require('../internals/createWrapper'); + +/** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Additional arguments provided to the function are appended + * to those provided to the wrapper function. The wrapper is executed with + * the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @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, Wilma, & Pebbles'); + * // => '

    Fred, Wilma, & Pebbles

    ' + */ +function wrap(value, wrapper) { + return createWrapper(wrapper, 16, [value]); +} + +module.exports = wrap; + +},{"../internals/createWrapper":115}],95:[function(require,module,exports){ +/** + * @license + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var arrays = require('./arrays'), + chaining = require('./chaining'), + collections = require('./collections'), + functions = require('./functions'), + objects = require('./objects'), + utilities = require('./utilities'), + forEach = require('./collections/forEach'), + forOwn = require('./objects/forOwn'), + isArray = require('./objects/isArray'), + lodashWrapper = require('./internals/lodashWrapper'), + mixin = require('./utilities/mixin'), + support = require('./support'), + templateSettings = require('./utilities/templateSettings'); + +/** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ +var arrayRef = []; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Native method shortcuts */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates a `lodash` object which wraps the given value to enable intuitive + * method chaining. + * + * In addition to Lo-Dash methods, wrappers also have the following `Array` methods: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, + * and `unshift` + * + * Chaining is supported in custom builds as long as the `value` method is + * implicitly or explicitly included in the build. + * + * The chainable wrapper functions are: + * `after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, + * `compose`, `concat`, `countBy`, `create`, `createCallback`, `curry`, + * `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`, `flatten`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`, + * `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `pull`, `push`, + * `range`, `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, + * `sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, `transform`, + * `union`, `uniq`, `unshift`, `unzip`, `values`, `where`, `without`, `wrap`, + * and `zip` + * + * The non-chainable wrapper functions are: + * `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `has`, `identity`, + * `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, + * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, + * `lastIndexOf`, `mixin`, `noConflict`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `runInContext`, + * `template`, `unescape`, `uniqueId`, and `value` + * + * The wrapper functions `first` and `last` return wrapped values when `n` is + * provided, otherwise they return unwrapped values. + * + * Explicit chaining can be enabled by using the `_.chain` method. + * + * @name _ + * @constructor + * @category Chaining + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns a `lodash` instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(num) { + * return num * num; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ +function lodash(value) { + // don't wrap if already wrapped, even if wrapped by a different `lodash` constructor + return (value && typeof value == 'object' && !isArray(value) && hasOwnProperty.call(value, '__wrapped__')) + ? value + : new lodashWrapper(value); +} +// ensure `new lodashWrapper` is an instance of `lodash` +lodashWrapper.prototype = lodash.prototype; + +// wrap `_.mixin` so it works when provided only one argument +mixin = (function(fn) { + var functions = objects.functions; + return function(object, source, options) { + if (!source || (!options && !functions(source).length)) { + if (options == null) { + options = source; + } + source = object; + object = lodash; + } + return fn(object, source, options); + }; +}(mixin)); + +// add functions that return wrapped values when chaining +lodash.after = functions.after; +lodash.assign = objects.assign; +lodash.at = collections.at; +lodash.bind = functions.bind; +lodash.bindAll = functions.bindAll; +lodash.bindKey = functions.bindKey; +lodash.chain = chaining.chain; +lodash.compact = arrays.compact; +lodash.compose = functions.compose; +lodash.constant = utilities.constant; +lodash.countBy = collections.countBy; +lodash.create = objects.create; +lodash.createCallback = functions.createCallback; +lodash.curry = functions.curry; +lodash.debounce = functions.debounce; +lodash.defaults = objects.defaults; +lodash.defer = functions.defer; +lodash.delay = functions.delay; +lodash.difference = arrays.difference; +lodash.filter = collections.filter; +lodash.flatten = arrays.flatten; +lodash.forEach = forEach; +lodash.forEachRight = collections.forEachRight; +lodash.forIn = objects.forIn; +lodash.forInRight = objects.forInRight; +lodash.forOwn = forOwn; +lodash.forOwnRight = objects.forOwnRight; +lodash.functions = objects.functions; +lodash.groupBy = collections.groupBy; +lodash.indexBy = collections.indexBy; +lodash.initial = arrays.initial; +lodash.intersection = arrays.intersection; +lodash.invert = objects.invert; +lodash.invoke = collections.invoke; +lodash.keys = objects.keys; +lodash.map = collections.map; +lodash.mapValues = objects.mapValues; +lodash.max = collections.max; +lodash.memoize = functions.memoize; +lodash.merge = objects.merge; +lodash.min = collections.min; +lodash.omit = objects.omit; +lodash.once = functions.once; +lodash.pairs = objects.pairs; +lodash.partial = functions.partial; +lodash.partialRight = functions.partialRight; +lodash.pick = objects.pick; +lodash.pluck = collections.pluck; +lodash.property = utilities.property; +lodash.pull = arrays.pull; +lodash.range = arrays.range; +lodash.reject = collections.reject; +lodash.remove = arrays.remove; +lodash.rest = arrays.rest; +lodash.shuffle = collections.shuffle; +lodash.sortBy = collections.sortBy; +lodash.tap = chaining.tap; +lodash.throttle = functions.throttle; +lodash.times = utilities.times; +lodash.toArray = collections.toArray; +lodash.transform = objects.transform; +lodash.union = arrays.union; +lodash.uniq = arrays.uniq; +lodash.values = objects.values; +lodash.where = collections.where; +lodash.without = arrays.without; +lodash.wrap = functions.wrap; +lodash.xor = arrays.xor; +lodash.zip = arrays.zip; +lodash.zipObject = arrays.zipObject; + +// add aliases +lodash.collect = collections.map; +lodash.drop = arrays.rest; +lodash.each = forEach; +lodash.eachRight = collections.forEachRight; +lodash.extend = objects.assign; +lodash.methods = objects.functions; +lodash.object = arrays.zipObject; +lodash.select = collections.filter; +lodash.tail = arrays.rest; +lodash.unique = arrays.uniq; +lodash.unzip = arrays.zip; + +// add functions to `lodash.prototype` +mixin(lodash); + +// add functions that return unwrapped values when chaining +lodash.clone = objects.clone; +lodash.cloneDeep = objects.cloneDeep; +lodash.contains = collections.contains; +lodash.escape = utilities.escape; +lodash.every = collections.every; +lodash.find = collections.find; +lodash.findIndex = arrays.findIndex; +lodash.findKey = objects.findKey; +lodash.findLast = collections.findLast; +lodash.findLastIndex = arrays.findLastIndex; +lodash.findLastKey = objects.findLastKey; +lodash.has = objects.has; +lodash.identity = utilities.identity; +lodash.indexOf = arrays.indexOf; +lodash.isArguments = objects.isArguments; +lodash.isArray = isArray; +lodash.isBoolean = objects.isBoolean; +lodash.isDate = objects.isDate; +lodash.isElement = objects.isElement; +lodash.isEmpty = objects.isEmpty; +lodash.isEqual = objects.isEqual; +lodash.isFinite = objects.isFinite; +lodash.isFunction = objects.isFunction; +lodash.isNaN = objects.isNaN; +lodash.isNull = objects.isNull; +lodash.isNumber = objects.isNumber; +lodash.isObject = objects.isObject; +lodash.isPlainObject = objects.isPlainObject; +lodash.isRegExp = objects.isRegExp; +lodash.isString = objects.isString; +lodash.isUndefined = objects.isUndefined; +lodash.lastIndexOf = arrays.lastIndexOf; +lodash.mixin = mixin; +lodash.noConflict = utilities.noConflict; +lodash.noop = utilities.noop; +lodash.now = utilities.now; +lodash.parseInt = utilities.parseInt; +lodash.random = utilities.random; +lodash.reduce = collections.reduce; +lodash.reduceRight = collections.reduceRight; +lodash.result = utilities.result; +lodash.size = collections.size; +lodash.some = collections.some; +lodash.sortedIndex = arrays.sortedIndex; +lodash.template = utilities.template; +lodash.unescape = utilities.unescape; +lodash.uniqueId = utilities.uniqueId; + +// add aliases +lodash.all = collections.every; +lodash.any = collections.some; +lodash.detect = collections.find; +lodash.findWhere = collections.find; +lodash.foldl = collections.reduce; +lodash.foldr = collections.reduceRight; +lodash.include = collections.contains; +lodash.inject = collections.reduce; + +mixin(function() { + var source = {} + forOwn(lodash, function(func, methodName) { + if (!lodash.prototype[methodName]) { + source[methodName] = func; + } + }); + return source; +}(), false); + +// add functions capable of returning wrapped and unwrapped values when chaining +lodash.first = arrays.first; +lodash.last = arrays.last; +lodash.sample = collections.sample; + +// add aliases +lodash.take = arrays.first; +lodash.head = arrays.first; + +forOwn(lodash, function(func, methodName) { + var callbackable = methodName !== 'sample'; + if (!lodash.prototype[methodName]) { + lodash.prototype[methodName]= function(n, guard) { + var chainAll = this.__chain__, + result = func(this.__wrapped__, n, guard); + + return !chainAll && (n == null || (guard && !(callbackable && typeof n == 'function'))) + ? result + : new lodashWrapper(result, chainAll); + }; + } +}); + +/** + * The semantic version number. + * + * @static + * @memberOf _ + * @type string + */ +lodash.VERSION = '2.4.1'; + +// add "Chaining" functions to the wrapper +lodash.prototype.chain = chaining.wrapperChain; +lodash.prototype.toString = chaining.wrapperToString; +lodash.prototype.value = chaining.wrapperValueOf; +lodash.prototype.valueOf = chaining.wrapperValueOf; + +// add `Array` functions that return unwrapped values +forEach(['join', 'pop', 'shift'], function(methodName) { + var func = arrayRef[methodName]; + lodash.prototype[methodName] = function() { + var chainAll = this.__chain__, + result = func.apply(this.__wrapped__, arguments); + + return chainAll + ? new lodashWrapper(result, chainAll) + : result; + }; +}); + +// add `Array` functions that return the existing wrapped value +forEach(['push', 'reverse', 'sort', 'unshift'], function(methodName) { + var func = arrayRef[methodName]; + lodash.prototype[methodName] = function() { + func.apply(this.__wrapped__, arguments); + return this; + }; +}); + +// add `Array` functions that return new wrapped values +forEach(['concat', 'slice', 'splice'], function(methodName) { + var func = arrayRef[methodName]; + lodash.prototype[methodName] = function() { + return new lodashWrapper(func.apply(this.__wrapped__, arguments), this.__chain__); + }; +}); + +lodash.support = support; +(lodash.templateSettings = utilities.templateSettings).imports._ = lodash; +module.exports = lodash; + +},{"./arrays":22,"./chaining":45,"./collections":51,"./collections/forEach":59,"./functions":78,"./internals/lodashWrapper":125,"./objects":139,"./objects/forOwn":149,"./objects/isArray":155,"./support":179,"./utilities":180,"./utilities/mixin":184,"./utilities/templateSettings":193}],96:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used to pool arrays and objects used internally */ +var arrayPool = []; + +module.exports = arrayPool; + +},{}],97:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreate = require('./baseCreate'), + isObject = require('../objects/isObject'), + setBindData = require('./setBindData'), + slice = require('./slice'); + +/** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ +var arrayRef = []; + +/** Native method shortcuts */ +var push = arrayRef.push; + +/** + * The base implementation of `_.bind` that creates the bound function and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new bound function. + */ +function baseBind(bindData) { + var func = bindData[0], + partialArgs = bindData[2], + thisArg = bindData[4]; + + function bound() { + // `Function#bind` spec + // http://es5.github.io/#x15.3.4.5 + if (partialArgs) { + // avoid `arguments` object deoptimizations by using `slice` instead + // of `Array.prototype.slice.call` and not assigning `arguments` to a + // variable as a ternary expression + var args = slice(partialArgs); + push.apply(args, arguments); + } + // mimic the constructor's `return` behavior + // http://es5.github.io/#x13.2.2 + if (this instanceof bound) { + // ensure `new bound` is an instance of `func` + var thisBinding = baseCreate(func.prototype), + result = func.apply(thisBinding, args || arguments); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisArg, args || arguments); + } + setBindData(bound, bindData); + return bound; +} + +module.exports = baseBind; + +},{"../objects/isObject":166,"./baseCreate":99,"./setBindData":134,"./slice":137}],98:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var assign = require('../objects/assign'), + forEach = require('../collections/forEach'), + forOwn = require('../objects/forOwn'), + getArray = require('./getArray'), + isArray = require('../objects/isArray'), + isObject = require('../objects/isObject'), + releaseArray = require('./releaseArray'), + slice = require('./slice'); + +/** Used to match regexp flags from their coerced string values */ +var reFlags = /\w*$/; + +/** `Object#toString` result shortcuts */ +var argsClass = '[object Arguments]', + arrayClass = '[object Array]', + boolClass = '[object Boolean]', + dateClass = '[object Date]', + funcClass = '[object Function]', + numberClass = '[object Number]', + objectClass = '[object Object]', + regexpClass = '[object RegExp]', + stringClass = '[object String]'; + +/** Used to identify object classifications that `_.clone` supports */ +var cloneableClasses = {}; +cloneableClasses[funcClass] = false; +cloneableClasses[argsClass] = cloneableClasses[arrayClass] = +cloneableClasses[boolClass] = cloneableClasses[dateClass] = +cloneableClasses[numberClass] = cloneableClasses[objectClass] = +cloneableClasses[regexpClass] = cloneableClasses[stringClass] = true; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** Native method shortcuts */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to lookup a built-in constructor by [[Class]] */ +var ctorByClass = {}; +ctorByClass[arrayClass] = Array; +ctorByClass[boolClass] = Boolean; +ctorByClass[dateClass] = Date; +ctorByClass[funcClass] = Function; +ctorByClass[objectClass] = Object; +ctorByClass[numberClass] = Number; +ctorByClass[regexpClass] = RegExp; +ctorByClass[stringClass] = String; + +/** + * The base implementation of `_.clone` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, isDeep, callback, stackA, stackB) { + if (callback) { + var result = callback(value); + if (typeof result != 'undefined') { + return result; + } + } + // inspect [[Class]] + var isObj = isObject(value); + if (isObj) { + var className = toString.call(value); + if (!cloneableClasses[className]) { + return value; + } + var ctor = ctorByClass[className]; + switch (className) { + case boolClass: + case dateClass: + return new ctor(+value); + + case numberClass: + case stringClass: + return new ctor(value); + + case regexpClass: + result = ctor(value.source, reFlags.exec(value)); + result.lastIndex = value.lastIndex; + return result; + } + } else { + return value; + } + var isArr = isArray(value); + if (isDeep) { + // check for circular references and return corresponding clone + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + result = isArr ? ctor(value.length) : {}; + } + else { + result = isArr ? slice(value) : assign({}, value); + } + // add array properties assigned by `RegExp#exec` + if (isArr) { + if (hasOwnProperty.call(value, 'index')) { + result.index = value.index; + } + if (hasOwnProperty.call(value, 'input')) { + result.input = value.input; + } + } + // exit for shallow clone + if (!isDeep) { + return result; + } + // 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 ? forEach : forOwn)(value, function(objValue, key) { + result[key] = baseClone(objValue, isDeep, callback, stackA, stackB); + }); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; +} + +module.exports = baseClone; + +},{"../collections/forEach":59,"../objects/assign":140,"../objects/forOwn":149,"../objects/isArray":155,"../objects/isObject":166,"./getArray":118,"./releaseArray":132,"./slice":137}],99:[function(require,module,exports){ +(function (global){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isNative = require('./isNative'), + isObject = require('../objects/isObject'), + noop = require('../utilities/noop'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate; + +/** + * 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. + */ +function baseCreate(prototype, properties) { + return isObject(prototype) ? nativeCreate(prototype) : {}; +} +// fallback for browsers without `Object.create` +if (!nativeCreate) { + baseCreate = (function() { + function Object() {} + return function(prototype) { + if (isObject(prototype)) { + Object.prototype = prototype; + var result = new Object; + Object.prototype = null; + } + return result || global.Object(); + }; + }()); +} + +module.exports = baseCreate; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"../objects/isObject":166,"../utilities/noop":186,"./isNative":122}],100:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var bind = require('../functions/bind'), + identity = require('../utilities/identity'), + setBindData = require('./setBindData'), + support = require('../support'); + +/** Used to detected named functions */ +var reFuncName = /^\s*function[ \n\r\t]+\w/; + +/** Used to detect functions containing a `this` reference */ +var reThis = /\bthis\b/; + +/** Native method shortcuts */ +var fnToString = Function.prototype.toString; + +/** + * The base implementation of `_.createCallback` without support for creating + * "_.pluck" or "_.where" style callbacks. + * + * @private + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + */ +function baseCreateCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + // exit early for no `thisArg` or already bound by `Function#bind` + if (typeof thisArg == 'undefined' || !('prototype' in func)) { + return func; + } + var bindData = func.__bindData__; + if (typeof bindData == 'undefined') { + if (support.funcNames) { + bindData = !func.name; + } + bindData = bindData || !support.funcDecomp; + if (!bindData) { + var source = fnToString.call(func); + if (!support.funcNames) { + bindData = !reFuncName.test(source); + } + if (!bindData) { + // checks if `func` references the `this` keyword and stores the result + bindData = reThis.test(source); + setBindData(func, bindData); + } + } + } + // exit early if there are no `this` references or `func` is bound + if (bindData === false || (bindData !== true && bindData[1] & 1)) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 2: return function(a, b) { + return func.call(thisArg, a, b); + }; + 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); + }; + } + return bind(func, thisArg); +} + +module.exports = baseCreateCallback; + +},{"../functions/bind":80,"../support":179,"../utilities/identity":183,"./setBindData":134}],101:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreate = require('./baseCreate'), + isObject = require('../objects/isObject'), + setBindData = require('./setBindData'), + slice = require('./slice'); + +/** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ +var arrayRef = []; + +/** Native method shortcuts */ +var push = arrayRef.push; + +/** + * The base implementation of `createWrapper` that creates the wrapper and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new function. + */ +function baseCreateWrapper(bindData) { + var func = bindData[0], + bitmask = bindData[1], + partialArgs = bindData[2], + partialRightArgs = bindData[3], + thisArg = bindData[4], + arity = bindData[5]; + + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + key = func; + + function bound() { + var thisBinding = isBind ? thisArg : this; + if (partialArgs) { + var args = slice(partialArgs); + push.apply(args, arguments); + } + if (partialRightArgs || isCurry) { + args || (args = slice(arguments)); + if (partialRightArgs) { + push.apply(args, partialRightArgs); + } + if (isCurry && args.length < arity) { + bitmask |= 16 & ~32; + return baseCreateWrapper([func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity]); + } + } + args || (args = arguments); + if (isBindKey) { + func = thisBinding[key]; + } + if (this instanceof bound) { + thisBinding = baseCreate(func.prototype); + var result = func.apply(thisBinding, args); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisBinding, args); + } + setBindData(bound, bindData); + return bound; +} + +module.exports = baseCreateWrapper; + +},{"../objects/isObject":166,"./baseCreate":99,"./setBindData":134,"./slice":137}],102:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseIndexOf = require('./baseIndexOf'), + cacheIndexOf = require('./cacheIndexOf'), + createCache = require('./createCache'), + largeArraySize = require('./largeArraySize'), + releaseObject = require('./releaseObject'); + +/** + * The base implementation of `_.difference` that accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to process. + * @param {Array} [values] The array of values to exclude. + * @returns {Array} Returns a new array of filtered values. + */ +function baseDifference(array, values) { + var index = -1, + indexOf = baseIndexOf, + length = array ? array.length : 0, + isLarge = length >= largeArraySize, + result = []; + + if (isLarge) { + var cache = createCache(values); + if (cache) { + indexOf = cacheIndexOf; + values = cache; + } else { + isLarge = false; + } + } + while (++index < length) { + var value = array[index]; + if (indexOf(values, value) < 0) { + result.push(value); + } + } + if (isLarge) { + releaseObject(values); + } + return result; +} + +module.exports = baseDifference; + +},{"./baseIndexOf":104,"./cacheIndexOf":109,"./createCache":114,"./largeArraySize":124,"./releaseObject":133}],103:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isArguments = require('../objects/isArguments'), + isArray = require('../objects/isArray'); + +/** + * The base implementation of `_.flatten` without support for callback + * shorthands or `thisArg` binding. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {boolean} [isStrict=false] A flag to restrict flattening to arrays and `arguments` objects. + * @param {number} [fromIndex=0] The index to start from. + * @returns {Array} Returns a new flattened array. + */ +function baseFlatten(array, isShallow, isStrict, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (value && typeof value == 'object' && typeof value.length == 'number' + && (isArray(value) || isArguments(value))) { + // recursively flatten arrays (susceptible to call stack limits) + if (!isShallow) { + value = baseFlatten(value, isShallow, isStrict); + } + var valIndex = -1, + valLength = value.length, + resIndex = result.length; + + result.length += valLength; + while (++valIndex < valLength) { + result[resIndex++] = value[valIndex]; + } + } else if (!isStrict) { + result.push(value); + } + } + return result; +} + +module.exports = baseFlatten; + +},{"../objects/isArguments":154,"../objects/isArray":155}],104:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * The base implementation of `_.indexOf` without support for binary searches + * or `fromIndex` constraints. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = baseIndexOf; + +},{}],105:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var forIn = require('../objects/forIn'), + getArray = require('./getArray'), + isFunction = require('../objects/isFunction'), + objectTypes = require('./objectTypes'), + releaseArray = require('./releaseArray'); + +/** `Object#toString` result shortcuts */ +var argsClass = '[object Arguments]', + arrayClass = '[object Array]', + boolClass = '[object Boolean]', + dateClass = '[object Date]', + numberClass = '[object Number]', + objectClass = '[object Object]', + regexpClass = '[object RegExp]', + stringClass = '[object String]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** Native method shortcuts */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.isEqual`, without support for `thisArg` binding, + * that allows partial "_.where" style comparisons. + * + * @private + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `a` objects. + * @param {Array} [stackB=[]] Tracks traversed `b` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { + // used to indicate that when comparing objects, `a` has at least the properties of `b` + if (callback) { + var result = callback(a, b); + if (typeof result != 'undefined') { + return !!result; + } + } + // exit early for identical values + if (a === b) { + // treat `+0` vs. `-0` as not equal + return a !== 0 || (1 / a == 1 / b); + } + var type = typeof a, + otherType = typeof b; + + // exit early for unlike primitive values + if (a === a && + !(a && objectTypes[type]) && + !(b && objectTypes[otherType])) { + return false; + } + // exit early for `null` and `undefined` avoiding ES3's Function#call behavior + // http://es5.github.io/#x15.3.4.4 + if (a == null || b == null) { + return a === b; + } + // compare [[Class]] names + var className = toString.call(a), + otherClass = toString.call(b); + + if (className == argsClass) { + className = objectClass; + } + if (otherClass == argsClass) { + otherClass = objectClass; + } + if (className != otherClass) { + return false; + } + switch (className) { + case boolClass: + case dateClass: + // 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 +a == +b; + + case numberClass: + // treat `NaN` vs. `NaN` as equal + return (a != +a) + ? b != +b + // but treat `+0` vs. `-0` as not equal + : (a == 0 ? (1 / a == 1 / b) : a == +b); + + case regexpClass: + case stringClass: + // coerce regexes to strings (http://es5.github.io/#x15.10.6.4) + // treat string primitives and their corresponding object instances as equal + return a == String(b); + } + var isArr = className == arrayClass; + if (!isArr) { + // unwrap any `lodash` wrapped values + var aWrapped = hasOwnProperty.call(a, '__wrapped__'), + bWrapped = hasOwnProperty.call(b, '__wrapped__'); + + if (aWrapped || bWrapped) { + return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB); + } + // exit for functions and DOM nodes + if (className != objectClass) { + return false; + } + // in older versions of Opera, `arguments` objects have `Array` constructors + var ctorA = a.constructor, + ctorB = b.constructor; + + // non `Object` object instances with different constructors are not equal + if (ctorA != ctorB && + !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) && + ('constructor' in a && 'constructor' in b) + ) { + return false; + } + } + // assume cyclic structures are equal + // the algorithm for detecting cyclic structures is adapted from ES 5.1 + // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3) + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == a) { + return stackB[length] == b; + } + } + var size = 0; + result = true; + + // add `a` and `b` to the stack of traversed objects + stackA.push(a); + stackB.push(b); + + // recursively compare objects and arrays (susceptible to call stack limits) + if (isArr) { + // compare lengths to determine if a deep comparison is necessary + length = a.length; + size = b.length; + result = size == length; + + if (result || isWhere) { + // deep compare the contents, ignoring non-numeric properties + while (size--) { + var index = length, + value = b[size]; + + if (isWhere) { + while (index--) { + if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } + } + else { + // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` + // which, in this case, is more costly + forIn(b, function(value, key, b) { + if (hasOwnProperty.call(b, key)) { + // count the number of properties. + size++; + // deep compare each property value. + return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB)); + } + }); + + if (result && !isWhere) { + // ensure both objects have the same number of properties + forIn(a, function(value, key, a) { + if (hasOwnProperty.call(a, key)) { + // `size` will be `-1` if `a` has more properties than `b` + return (result = --size > -1); + } + }); + } + } + stackA.pop(); + stackB.pop(); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; +} + +module.exports = baseIsEqual; + +},{"../objects/forIn":147,"../objects/isFunction":162,"./getArray":118,"./objectTypes":128,"./releaseArray":132}],106:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var forEach = require('../collections/forEach'), + forOwn = require('../objects/forOwn'), + isArray = require('../objects/isArray'), + isPlainObject = require('../objects/isPlainObject'); + +/** + * The base implementation of `_.merge` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [callback] The function to customize merging properties. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + */ +function baseMerge(object, source, callback, stackA, stackB) { + (isArray(source) ? forEach : forOwn)(source, function(source, key) { + var found, + isArr, + result = source, + value = object[key]; + + if (source && ((isArr = isArray(source)) || isPlainObject(source))) { + // avoid merging previously merged cyclic sources + var stackLength = stackA.length; + while (stackLength--) { + if ((found = stackA[stackLength] == source)) { + value = stackB[stackLength]; + break; + } + } + if (!found) { + var isShallow; + if (callback) { + result = callback(value, source); + if ((isShallow = typeof result != 'undefined')) { + value = result; + } + } + if (!isShallow) { + value = isArr + ? (isArray(value) ? value : []) + : (isPlainObject(value) ? value : {}); + } + // add `source` and associated `value` to the stack of traversed objects + stackA.push(source); + stackB.push(value); + + // recursively merge objects and arrays (susceptible to call stack limits) + if (!isShallow) { + baseMerge(value, source, callback, stackA, stackB); + } + } + } + else { + if (callback) { + result = callback(value, source); + if (typeof result == 'undefined') { + result = source; + } + } + if (typeof result != 'undefined') { + value = result; + } + } + object[key] = value; + }); +} + +module.exports = baseMerge; + +},{"../collections/forEach":59,"../objects/forOwn":149,"../objects/isArray":155,"../objects/isPlainObject":167}],107:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Native method shortcuts */ +var floor = Math.floor; + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeRandom = Math.random; + +/** + * The base implementation of `_.random` without argument juggling or support + * for returning floating-point numbers. + * + * @private + * @param {number} min The minimum possible value. + * @param {number} max The maximum possible value. + * @returns {number} Returns a random number. + */ +function baseRandom(min, max) { + return min + floor(nativeRandom() * (max - min + 1)); +} + +module.exports = baseRandom; + +},{}],108:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseIndexOf = require('./baseIndexOf'), + cacheIndexOf = require('./cacheIndexOf'), + createCache = require('./createCache'), + getArray = require('./getArray'), + largeArraySize = require('./largeArraySize'), + releaseArray = require('./releaseArray'), + releaseObject = require('./releaseObject'); + +/** + * The base implementation of `_.uniq` without support for callback shorthands + * or `thisArg` binding. + * + * @private + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function} [callback] The function called per iteration. + * @returns {Array} Returns a duplicate-value-free array. + */ +function baseUniq(array, isSorted, callback) { + var index = -1, + indexOf = baseIndexOf, + length = array ? array.length : 0, + result = []; + + var isLarge = !isSorted && length >= largeArraySize, + seen = (callback || isLarge) ? getArray() : result; + + if (isLarge) { + var cache = createCache(seen); + indexOf = cacheIndexOf; + seen = cache; + } + while (++index < length) { + var value = array[index], + computed = callback ? callback(value, index, array) : value; + + if (isSorted + ? !index || seen[seen.length - 1] !== computed + : indexOf(seen, computed) < 0 + ) { + if (callback || isLarge) { + seen.push(computed); + } + result.push(value); + } + } + if (isLarge) { + releaseArray(seen.array); + releaseObject(seen); + } else if (callback) { + releaseArray(seen); + } + return result; +} + +module.exports = baseUniq; + +},{"./baseIndexOf":104,"./cacheIndexOf":109,"./createCache":114,"./getArray":118,"./largeArraySize":124,"./releaseArray":132,"./releaseObject":133}],109:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseIndexOf = require('./baseIndexOf'), + keyPrefix = require('./keyPrefix'); + +/** + * An implementation of `_.contains` for cache objects that mimics the return + * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache object to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ +function cacheIndexOf(cache, value) { + var type = typeof value; + cache = cache.cache; + + if (type == 'boolean' || value == null) { + return cache[value] ? 0 : -1; + } + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value; + cache = (cache = cache[type]) && cache[key]; + + return type == 'object' + ? (cache && baseIndexOf(cache, value) > -1 ? 0 : -1) + : (cache ? 0 : -1); +} + +module.exports = cacheIndexOf; + +},{"./baseIndexOf":104,"./keyPrefix":123}],110:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var keyPrefix = require('./keyPrefix'); + +/** + * Adds a given value to the corresponding cache object. + * + * @private + * @param {*} value The value to add to the cache. + */ +function cachePush(value) { + var cache = this.cache, + type = typeof value; + + if (type == 'boolean' || value == null) { + cache[value] = true; + } else { + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value, + typeCache = cache[type] || (cache[type] = {}); + + if (type == 'object') { + (typeCache[key] || (typeCache[key] = [])).push(value); + } else { + typeCache[key] = true; + } + } +} + +module.exports = cachePush; + +},{"./keyPrefix":123}],111:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Used by `_.max` and `_.min` as the default callback when a given + * collection is a string value. + * + * @private + * @param {string} value The character to inspect. + * @returns {number} Returns the code unit of given character. + */ +function charAtCallback(value) { + return value.charCodeAt(0); +} + +module.exports = charAtCallback; + +},{}],112:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Used by `sortBy` to compare transformed `collection` elements, stable sorting + * them in ascending order. + * + * @private + * @param {Object} a The object to compare to `b`. + * @param {Object} b The object to compare to `a`. + * @returns {number} Returns the sort order indicator of `1` or `-1`. + */ +function compareAscending(a, b) { + var ac = a.criteria, + bc = b.criteria, + index = -1, + length = ac.length; + + while (++index < length) { + var value = ac[index], + other = bc[index]; + + if (value !== other) { + if (value > other || typeof value == 'undefined') { + return 1; + } + if (value < other || typeof other == 'undefined') { + return -1; + } + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to return the same value for + // `a` and `b`. See https://github.com/jashkenas/underscore/pull/1247 + // + // This also ensures a stable sort in V8 and other engines. + // See http://code.google.com/p/v8/issues/detail?id=90 + return a.index - b.index; +} + +module.exports = compareAscending; + +},{}],113:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + forOwn = require('../objects/forOwn'), + isArray = require('../objects/isArray'); + +/** + * Creates a function that aggregates a collection, creating an object composed + * of keys generated from the results of running each element of the collection + * through a callback. The given `setter` function sets the keys and values + * of the composed object. + * + * @private + * @param {Function} setter The setter function. + * @returns {Function} Returns the new aggregator function. + */ +function createAggregator(setter) { + return function(collection, callback, thisArg) { + var result = {}; + callback = createCallback(callback, thisArg, 3); + + var index = -1, + length = collection ? collection.length : 0; + + if (typeof length == 'number') { + while (++index < length) { + var value = collection[index]; + setter(result, value, callback(value, index, collection), collection); + } + } else { + forOwn(collection, function(value, key, collection) { + setter(result, value, callback(value, key, collection), collection); + }); + } + return result; + }; +} + +module.exports = createAggregator; + +},{"../functions/createCallback":84,"../objects/forOwn":149,"../objects/isArray":155}],114:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var cachePush = require('./cachePush'), + getObject = require('./getObject'), + releaseObject = require('./releaseObject'); + +/** + * Creates a cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [array=[]] The array to search. + * @returns {null|Object} Returns the cache object or `null` if caching should not be used. + */ +function createCache(array) { + var index = -1, + length = array.length, + first = array[0], + mid = array[(length / 2) | 0], + last = array[length - 1]; + + if (first && typeof first == 'object' && + mid && typeof mid == 'object' && last && typeof last == 'object') { + return false; + } + var cache = getObject(); + cache['false'] = cache['null'] = cache['true'] = cache['undefined'] = false; + + var result = getObject(); + result.array = array; + result.cache = cache; + result.push = cachePush; + + while (++index < length) { + result.push(array[index]); + } + return result; +} + +module.exports = createCache; + +},{"./cachePush":110,"./getObject":119,"./releaseObject":133}],115:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseBind = require('./baseBind'), + baseCreateWrapper = require('./baseCreateWrapper'), + isFunction = require('../objects/isFunction'), + slice = require('./slice'); + +/** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ +var arrayRef = []; + +/** Native method shortcuts */ +var push = arrayRef.push, + unshift = arrayRef.unshift; + +/** + * Creates a function that, when called, either curries or invokes `func` + * with an 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 method flags to compose. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` + * 8 - `_.curry` (bound) + * 16 - `_.partial` + * 32 - `_.partialRight` + * @param {Array} [partialArgs] An array of arguments to prepend to those + * provided to the new function. + * @param {Array} [partialRightArgs] An array of arguments to append to those + * provided to the new function. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new function. + */ +function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + isPartial = bitmask & 16, + isPartialRight = bitmask & 32; + + if (!isBindKey && !isFunction(func)) { + throw new TypeError; + } + if (isPartial && !partialArgs.length) { + bitmask &= ~16; + isPartial = partialArgs = false; + } + if (isPartialRight && !partialRightArgs.length) { + bitmask &= ~32; + isPartialRight = partialRightArgs = false; + } + var bindData = func && func.__bindData__; + if (bindData && bindData !== true) { + // clone `bindData` + bindData = slice(bindData); + if (bindData[2]) { + bindData[2] = slice(bindData[2]); + } + if (bindData[3]) { + bindData[3] = slice(bindData[3]); + } + // set `thisBinding` is not previously bound + if (isBind && !(bindData[1] & 1)) { + bindData[4] = thisArg; + } + // set if previously bound but not currently (subsequent curried functions) + if (!isBind && bindData[1] & 1) { + bitmask |= 8; + } + // set curried arity if not yet set + if (isCurry && !(bindData[1] & 4)) { + bindData[5] = arity; + } + // append partial left arguments + if (isPartial) { + push.apply(bindData[2] || (bindData[2] = []), partialArgs); + } + // append partial right arguments + if (isPartialRight) { + unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs); + } + // merge flags + bindData[1] |= bitmask; + return createWrapper.apply(null, bindData); + } + // fast path for `_.bind` + var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper; + return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]); +} + +module.exports = createWrapper; + +},{"../objects/isFunction":162,"./baseBind":97,"./baseCreateWrapper":101,"./slice":137}],116:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var htmlEscapes = require('./htmlEscapes'); + +/** + * Used by `escape` to convert characters to HTML entities. + * + * @private + * @param {string} match The matched character to escape. + * @returns {string} Returns the escaped character. + */ +function escapeHtmlChar(match) { + return htmlEscapes[match]; +} + +module.exports = escapeHtmlChar; + +},{"./htmlEscapes":120}],117:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used to escape characters for inclusion in compiled string literals */ +var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\t': 't', + '\u2028': 'u2028', + '\u2029': 'u2029' +}; + +/** + * Used by `template` to escape characters for inclusion in compiled + * string literals. + * + * @private + * @param {string} match The matched character to escape. + * @returns {string} Returns the escaped character. + */ +function escapeStringChar(match) { + return '\\' + stringEscapes[match]; +} + +module.exports = escapeStringChar; + +},{}],118:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var arrayPool = require('./arrayPool'); + +/** + * Gets an array from the array pool or creates a new one if the pool is empty. + * + * @private + * @returns {Array} The array from the pool. + */ +function getArray() { + return arrayPool.pop() || []; +} + +module.exports = getArray; + +},{"./arrayPool":96}],119:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var objectPool = require('./objectPool'); + +/** + * Gets an object from the object pool or creates a new one if the pool is empty. + * + * @private + * @returns {Object} The object from the pool. + */ +function getObject() { + return objectPool.pop() || { + 'array': null, + 'cache': null, + 'criteria': null, + 'false': false, + 'index': 0, + 'null': false, + 'number': null, + 'object': null, + 'push': null, + 'string': null, + 'true': false, + 'undefined': false, + 'value': null + }; +} + +module.exports = getObject; + +},{"./objectPool":127}],120:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Used to convert characters to HTML entities: + * + * Though the `>` character is escaped for symmetry, characters like `>` and `/` + * don't require escaping in HTML and have no special meaning unless they're part + * of a tag or an unquoted attribute value. + * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") + */ +var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}; + +module.exports = htmlEscapes; + +},{}],121:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var htmlEscapes = require('./htmlEscapes'), + invert = require('../objects/invert'); + +/** Used to convert HTML entities to characters */ +var htmlUnescapes = invert(htmlEscapes); + +module.exports = htmlUnescapes; + +},{"../objects/invert":153,"./htmlEscapes":120}],122:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** Used to detect if a method is native */ +var reNative = RegExp('^' + + String(toString) + .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + .replace(/toString| for [^\]]+/g, '.*?') + '$' +); + +/** + * Checks if `value` is a native function. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a native function, else `false`. + */ +function isNative(value) { + return typeof value == 'function' && reNative.test(value); +} + +module.exports = isNative; + +},{}],123:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */ +var keyPrefix = +new Date + ''; + +module.exports = keyPrefix; + +},{}],124:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used as the size when optimizations are enabled for large arrays */ +var largeArraySize = 75; + +module.exports = largeArraySize; + +},{}],125:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * A fast path for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap in a `lodash` instance. + * @param {boolean} chainAll A flag to enable chaining for all methods + * @returns {Object} Returns a `lodash` instance. + */ +function lodashWrapper(value, chainAll) { + this.__chain__ = !!chainAll; + this.__wrapped__ = value; +} + +module.exports = lodashWrapper; + +},{}],126:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used as the max size of the `arrayPool` and `objectPool` */ +var maxPoolSize = 40; + +module.exports = maxPoolSize; + +},{}],127:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used to pool arrays and objects used internally */ +var objectPool = []; + +module.exports = objectPool; + +},{}],128:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used to determine if values are of the language type Object */ +var objectTypes = { + 'boolean': false, + 'function': true, + 'object': true, + 'number': false, + 'string': false, + 'undefined': false +}; + +module.exports = objectTypes; + +},{}],129:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var htmlUnescapes = require('./htmlUnescapes'), + keys = require('../objects/keys'); + +/** Used to match HTML entities and HTML characters */ +var reEscapedHtml = RegExp('(' + keys(htmlUnescapes).join('|') + ')', 'g'); + +module.exports = reEscapedHtml; + +},{"../objects/keys":171,"./htmlUnescapes":121}],130:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used to match "interpolate" template delimiters */ +var reInterpolate = /<%=([\s\S]+?)%>/g; + +module.exports = reInterpolate; + +},{}],131:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var htmlEscapes = require('./htmlEscapes'), + keys = require('../objects/keys'); + +/** Used to match HTML entities and HTML characters */ +var reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); + +module.exports = reUnescapedHtml; + +},{"../objects/keys":171,"./htmlEscapes":120}],132:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var arrayPool = require('./arrayPool'), + maxPoolSize = require('./maxPoolSize'); + +/** + * Releases the given array back to the array pool. + * + * @private + * @param {Array} [array] The array to release. + */ +function releaseArray(array) { + array.length = 0; + if (arrayPool.length < maxPoolSize) { + arrayPool.push(array); + } +} + +module.exports = releaseArray; + +},{"./arrayPool":96,"./maxPoolSize":126}],133:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var maxPoolSize = require('./maxPoolSize'), + objectPool = require('./objectPool'); + +/** + * Releases the given object back to the object pool. + * + * @private + * @param {Object} [object] The object to release. + */ +function releaseObject(object) { + var cache = object.cache; + if (cache) { + releaseObject(cache); + } + object.array = object.cache = object.criteria = object.object = object.number = object.string = object.value = null; + if (objectPool.length < maxPoolSize) { + objectPool.push(object); + } +} + +module.exports = releaseObject; + +},{"./maxPoolSize":126,"./objectPool":127}],134:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isNative = require('./isNative'), + noop = require('../utilities/noop'); + +/** Used as the property descriptor for `__bindData__` */ +var descriptor = { + 'configurable': false, + 'enumerable': false, + 'value': null, + 'writable': false +}; + +/** Used to set meta data on functions */ +var defineProperty = (function() { + // IE 8 only accepts DOM elements + try { + var o = {}, + func = isNative(func = Object.defineProperty) && func, + result = func(o, o, o) && func; + } catch(e) { } + return result; +}()); + +/** + * Sets `this` binding data on a given function. + * + * @private + * @param {Function} func The function to set data on. + * @param {Array} value The data array to set. + */ +var setBindData = !defineProperty ? noop : function(func, value) { + descriptor.value = value; + defineProperty(func, '__bindData__', descriptor); +}; + +module.exports = setBindData; + +},{"../utilities/noop":186,"./isNative":122}],135:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var forIn = require('../objects/forIn'), + isFunction = require('../objects/isFunction'); + +/** `Object#toString` result shortcuts */ +var objectClass = '[object Object]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** Native method shortcuts */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A fallback implementation of `isPlainObject` which checks if a given value + * is an object created by the `Object` constructor, assuming objects created + * by the `Object` constructor have no inherited enumerable properties and that + * there are no `Object.prototype` extensions. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + */ +function shimIsPlainObject(value) { + var ctor, + result; + + // avoid non Object objects, `arguments` objects, and DOM elements + if (!(value && toString.call(value) == objectClass) || + (ctor = value.constructor, isFunction(ctor) && !(ctor instanceof ctor))) { + return false; + } + // 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. + forIn(value, function(value, key) { + result = key; + }); + return typeof result == 'undefined' || hasOwnProperty.call(value, result); +} + +module.exports = shimIsPlainObject; + +},{"../objects/forIn":147,"../objects/isFunction":162}],136:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var objectTypes = require('./objectTypes'); + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Native method shortcuts */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A fallback implementation of `Object.keys` which produces an array of the + * given object's own enumerable property names. + * + * @private + * @type Function + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names. + */ +var shimKeys = function(object) { + var index, iterable = object, result = []; + if (!iterable) return result; + if (!(objectTypes[typeof object])) return result; + for (index in iterable) { + if (hasOwnProperty.call(iterable, index)) { + result.push(index); + } + } + return result +}; + +module.exports = shimKeys; + +},{"./objectTypes":128}],137:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Slices the `collection` from the `start` index up to, but not including, + * the `end` index. + * + * Note: This function is used instead of `Array#slice` to support node lists + * in IE < 9 and to ensure dense arrays are returned. + * + * @private + * @param {Array|Object|string} collection The collection to slice. + * @param {number} start The start index. + * @param {number} end The end index. + * @returns {Array} Returns the new array. + */ +function slice(array, start, end) { + start || (start = 0); + if (typeof end == 'undefined') { + end = array ? array.length : 0; + } + var index = -1, + length = end - start || 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = array[start + index]; + } + return result; +} + +module.exports = slice; + +},{}],138:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var htmlUnescapes = require('./htmlUnescapes'); + +/** + * Used by `unescape` to convert HTML entities to characters. + * + * @private + * @param {string} match The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ +function unescapeHtmlChar(match) { + return htmlUnescapes[match]; +} + +module.exports = unescapeHtmlChar; + +},{"./htmlUnescapes":121}],139:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +module.exports = { + 'assign': require('./objects/assign'), + 'clone': require('./objects/clone'), + 'cloneDeep': require('./objects/cloneDeep'), + 'create': require('./objects/create'), + 'defaults': require('./objects/defaults'), + 'extend': require('./objects/assign'), + 'findKey': require('./objects/findKey'), + 'findLastKey': require('./objects/findLastKey'), + 'forIn': require('./objects/forIn'), + 'forInRight': require('./objects/forInRight'), + 'forOwn': require('./objects/forOwn'), + 'forOwnRight': require('./objects/forOwnRight'), + 'functions': require('./objects/functions'), + 'has': require('./objects/has'), + 'invert': require('./objects/invert'), + 'isArguments': require('./objects/isArguments'), + 'isArray': require('./objects/isArray'), + 'isBoolean': require('./objects/isBoolean'), + 'isDate': require('./objects/isDate'), + 'isElement': require('./objects/isElement'), + 'isEmpty': require('./objects/isEmpty'), + 'isEqual': require('./objects/isEqual'), + 'isFinite': require('./objects/isFinite'), + 'isFunction': require('./objects/isFunction'), + 'isNaN': require('./objects/isNaN'), + 'isNull': require('./objects/isNull'), + 'isNumber': require('./objects/isNumber'), + 'isObject': require('./objects/isObject'), + 'isPlainObject': require('./objects/isPlainObject'), + 'isRegExp': require('./objects/isRegExp'), + 'isString': require('./objects/isString'), + 'isUndefined': require('./objects/isUndefined'), + 'keys': require('./objects/keys'), + 'mapValues': require('./objects/mapValues'), + 'merge': require('./objects/merge'), + 'methods': require('./objects/functions'), + 'omit': require('./objects/omit'), + 'pairs': require('./objects/pairs'), + 'pick': require('./objects/pick'), + 'transform': require('./objects/transform'), + 'values': require('./objects/values') +}; + +},{"./objects/assign":140,"./objects/clone":141,"./objects/cloneDeep":142,"./objects/create":143,"./objects/defaults":144,"./objects/findKey":145,"./objects/findLastKey":146,"./objects/forIn":147,"./objects/forInRight":148,"./objects/forOwn":149,"./objects/forOwnRight":150,"./objects/functions":151,"./objects/has":152,"./objects/invert":153,"./objects/isArguments":154,"./objects/isArray":155,"./objects/isBoolean":156,"./objects/isDate":157,"./objects/isElement":158,"./objects/isEmpty":159,"./objects/isEqual":160,"./objects/isFinite":161,"./objects/isFunction":162,"./objects/isNaN":163,"./objects/isNull":164,"./objects/isNumber":165,"./objects/isObject":166,"./objects/isPlainObject":167,"./objects/isRegExp":168,"./objects/isString":169,"./objects/isUndefined":170,"./objects/keys":171,"./objects/mapValues":172,"./objects/merge":173,"./objects/omit":174,"./objects/pairs":175,"./objects/pick":176,"./objects/transform":177,"./objects/values":178}],140:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + keys = require('./keys'), + objectTypes = require('../internals/objectTypes'); + +/** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources will overwrite property assignments of previous + * sources. If a callback is provided it will be executed to produce the + * assigned values. The callback is bound to `thisArg` and invoked with two + * arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @type Function + * @alias extend + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize assigning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * _.assign({ 'name': 'fred' }, { 'employer': 'slate' }); + * // => { 'name': 'fred', 'employer': 'slate' } + * + * var defaults = _.partialRight(_.assign, function(a, b) { + * return typeof a == 'undefined' ? b : a; + * }); + * + * var object = { 'name': 'barney' }; + * defaults(object, { 'name': 'fred', 'employer': 'slate' }); + * // => { 'name': 'barney', 'employer': 'slate' } + */ +var assign = function(object, source, guard) { + var index, iterable = object, result = iterable; + if (!iterable) return result; + var args = arguments, + argsIndex = 0, + argsLength = typeof guard == 'number' ? 2 : args.length; + if (argsLength > 3 && typeof args[argsLength - 2] == 'function') { + var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2); + } else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') { + callback = args[--argsLength]; + } + while (++argsIndex < argsLength) { + iterable = args[argsIndex]; + if (iterable && objectTypes[typeof iterable]) { + var ownIndex = -1, + ownProps = objectTypes[typeof iterable] && keys(iterable), + length = ownProps ? ownProps.length : 0; + + while (++ownIndex < length) { + index = ownProps[ownIndex]; + result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]; + } + } + } + return result +}; + +module.exports = assign; + +},{"../internals/baseCreateCallback":100,"../internals/objectTypes":128,"./keys":171}],141:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseClone = require('../internals/baseClone'), + baseCreateCallback = require('../internals/baseCreateCallback'); + +/** + * Creates a clone of `value`. If `isDeep` is `true` nested objects will also + * be cloned, otherwise they will be assigned by reference. If a callback + * is provided it will be executed to produce the cloned values. If the + * callback returns `undefined` cloning will be handled by the method instead. + * The callback is bound to `thisArg` and invoked with one argument; (value). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var shallow = _.clone(characters); + * shallow[0] === characters[0]; + * // => true + * + * var deep = _.clone(characters, true); + * deep[0] === characters[0]; + * // => false + * + * _.mixin({ + * 'clone': _.partialRight(_.clone, function(value) { + * return _.isElement(value) ? value.cloneNode(false) : undefined; + * }) + * }); + * + * var clone = _.clone(document.body); + * clone.childNodes.length; + * // => 0 + */ +function clone(value, isDeep, callback, thisArg) { + // allows working with "Collections" methods without using their `index` + // and `collection` arguments for `isDeep` and `callback` + if (typeof isDeep != 'boolean' && isDeep != null) { + thisArg = callback; + callback = isDeep; + isDeep = false; + } + return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); +} + +module.exports = clone; + +},{"../internals/baseClone":98,"../internals/baseCreateCallback":100}],142:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseClone = require('../internals/baseClone'), + baseCreateCallback = require('../internals/baseCreateCallback'); + +/** + * Creates a deep clone of `value`. If a callback is provided it will be + * executed to produce the cloned values. If the callback returns `undefined` + * cloning will be handled by the method instead. The callback is bound to + * `thisArg` and invoked with one argument; (value). + * + * Note: This method is loosely based on the structured clone algorithm. Functions + * and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and + * objects created by constructors other than `Object` are cloned to plain `Object` objects. + * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var deep = _.cloneDeep(characters); + * deep[0] === characters[0]; + * // => false + * + * var view = { + * 'label': 'docs', + * 'node': element + * }; + * + * var clone = _.cloneDeep(view, function(value) { + * return _.isElement(value) ? value.cloneNode(true) : undefined; + * }); + * + * clone.node == view.node; + * // => false + */ +function cloneDeep(value, callback, thisArg) { + return baseClone(value, true, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); +} + +module.exports = cloneDeep; + +},{"../internals/baseClone":98,"../internals/baseCreateCallback":100}],143:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var assign = require('./assign'), + baseCreate = require('../internals/baseCreate'); + +/** + * 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 Objects + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @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) { + var result = baseCreate(prototype); + return properties ? assign(result, properties) : result; +} + +module.exports = create; + +},{"../internals/baseCreate":99,"./assign":140}],144:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var keys = require('./keys'), + objectTypes = require('../internals/objectTypes'); + +/** + * 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 defaults of the same property will be ignored. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param- {Object} [guard] Allows working with `_.reduce` without using its + * `key` and `object` arguments as sources. + * @returns {Object} Returns the destination object. + * @example + * + * var object = { 'name': 'barney' }; + * _.defaults(object, { 'name': 'fred', 'employer': 'slate' }); + * // => { 'name': 'barney', 'employer': 'slate' } + */ +var defaults = function(object, source, guard) { + var index, iterable = object, result = iterable; + if (!iterable) return result; + var args = arguments, + argsIndex = 0, + argsLength = typeof guard == 'number' ? 2 : args.length; + while (++argsIndex < argsLength) { + iterable = args[argsIndex]; + if (iterable && objectTypes[typeof iterable]) { + var ownIndex = -1, + ownProps = objectTypes[typeof iterable] && keys(iterable), + length = ownProps ? ownProps.length : 0; + + while (++ownIndex < length) { + index = ownProps[ownIndex]; + if (typeof result[index] == 'undefined') result[index] = iterable[index]; + } + } + } + return result +}; + +module.exports = defaults; + +},{"../internals/objectTypes":128,"./keys":171}],145:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + forOwn = require('./forOwn'); + +/** + * This method is like `_.findIndex` except that it returns the key of the + * first element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': false }, + * 'fred': { 'age': 40, 'blocked': true }, + * 'pebbles': { 'age': 1, 'blocked': false } + * }; + * + * _.findKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => 'barney' (property order is not guaranteed across environments) + * + * // using "_.where" callback shorthand + * _.findKey(characters, { 'age': 1 }); + * // => 'pebbles' + * + * // using "_.pluck" callback shorthand + * _.findKey(characters, 'blocked'); + * // => 'fred' + */ +function findKey(object, callback, thisArg) { + var result; + callback = createCallback(callback, thisArg, 3); + forOwn(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; +} + +module.exports = findKey; + +},{"../functions/createCallback":84,"./forOwn":149}],146:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + forOwnRight = require('./forOwnRight'); + +/** + * 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 `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': true }, + * 'fred': { 'age': 40, 'blocked': false }, + * 'pebbles': { 'age': 1, 'blocked': true } + * }; + * + * _.findLastKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => returns `pebbles`, assuming `_.findKey` returns `barney` + * + * // using "_.where" callback shorthand + * _.findLastKey(characters, { 'age': 40 }); + * // => 'fred' + * + * // using "_.pluck" callback shorthand + * _.findLastKey(characters, 'blocked'); + * // => 'pebbles' + */ +function findLastKey(object, callback, thisArg) { + var result; + callback = createCallback(callback, thisArg, 3); + forOwnRight(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; +} + +module.exports = findLastKey; + +},{"../functions/createCallback":84,"./forOwnRight":150}],147:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + objectTypes = require('../internals/objectTypes'); + +/** + * Iterates over own and inherited enumerable properties of an object, + * executing the callback for each property. The callback is bound to `thisArg` + * and invoked with three arguments; (value, key, object). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forIn(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments) + */ +var forIn = function(collection, callback, thisArg) { + var index, iterable = collection, result = iterable; + if (!iterable) return result; + if (!objectTypes[typeof iterable]) return result; + callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3); + for (index in iterable) { + if (callback(iterable[index], index, collection) === false) return result; + } + return result +}; + +module.exports = forIn; + +},{"../internals/baseCreateCallback":100,"../internals/objectTypes":128}],148:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + forIn = require('./forIn'); + +/** + * This method is like `_.forIn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forInRight(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'move', 'y', and 'x' assuming `_.forIn ` logs 'x', 'y', and 'move' + */ +function forInRight(object, callback, thisArg) { + var pairs = []; + + forIn(object, function(value, key) { + pairs.push(key, value); + }); + + var length = pairs.length; + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + if (callback(pairs[length--], pairs[length], object) === false) { + break; + } + } + return object; +} + +module.exports = forInRight; + +},{"../internals/baseCreateCallback":100,"./forIn":147}],149:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + keys = require('./keys'), + objectTypes = require('../internals/objectTypes'); + +/** + * Iterates over own enumerable properties of an object, executing the callback + * for each property. The callback is bound to `thisArg` and invoked with three + * arguments; (value, key, object). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs '0', '1', and 'length' (property order is not guaranteed across environments) + */ +var forOwn = function(collection, callback, thisArg) { + var index, iterable = collection, result = iterable; + if (!iterable) return result; + if (!objectTypes[typeof iterable]) return result; + callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3); + var ownIndex = -1, + ownProps = objectTypes[typeof iterable] && keys(iterable), + length = ownProps ? ownProps.length : 0; + + while (++ownIndex < length) { + index = ownProps[ownIndex]; + if (callback(iterable[index], index, collection) === false) return result; + } + return result +}; + +module.exports = forOwn; + +},{"../internals/baseCreateCallback":100,"../internals/objectTypes":128,"./keys":171}],150:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + keys = require('./keys'); + +/** + * This method is like `_.forOwn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs 'length', '1', and '0' assuming `_.forOwn` logs '0', '1', and 'length' + */ +function forOwnRight(object, callback, thisArg) { + var props = keys(object), + length = props.length; + + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + var key = props[length]; + if (callback(object[key], key, object) === false) { + break; + } + } + return object; +} + +module.exports = forOwnRight; + +},{"../internals/baseCreateCallback":100,"./keys":171}],151:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var forIn = require('./forIn'), + isFunction = require('./isFunction'); + +/** + * Creates a sorted array of property names of all enumerable properties, + * own and inherited, of `object` that have function values. + * + * @static + * @memberOf _ + * @alias methods + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names that have function values. + * @example + * + * _.functions(_); + * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] + */ +function functions(object) { + var result = []; + forIn(object, function(value, key) { + if (isFunction(value)) { + result.push(key); + } + }); + return result.sort(); +} + +module.exports = functions; + +},{"./forIn":147,"./isFunction":162}],152:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Native method shortcuts */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if the specified property name exists as a direct property of `object`, + * instead of an inherited property. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to check. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. + * @example + * + * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); + * // => true + */ +function has(object, key) { + return object ? hasOwnProperty.call(object, key) : false; +} + +module.exports = has; + +},{}],153:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var keys = require('./keys'); + +/** + * Creates an object composed of the inverted keys and values of the given object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to invert. + * @returns {Object} Returns the created inverted object. + * @example + * + * _.invert({ 'first': 'fred', 'second': 'barney' }); + * // => { 'fred': 'first', 'barney': 'second' } + */ +function invert(object) { + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + result[object[key]] = key; + } + return result; +} + +module.exports = invert; + +},{"./keys":171}],154:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result shortcuts */ +var argsClass = '[object Arguments]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** + * Checks if `value` is an `arguments` object. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`. + * @example + * + * (function() { return _.isArguments(arguments); })(1, 2, 3); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == argsClass || false; +} + +module.exports = isArguments; + +},{}],155:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isNative = require('../internals/isNative'); + +/** `Object#toString` result shortcuts */ +var arrayClass = '[object Array]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray; + +/** + * Checks if `value` is an array. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an array, else `false`. + * @example + * + * (function() { return _.isArray(arguments); })(); + * // => false + * + * _.isArray([1, 2, 3]); + * // => true + */ +var isArray = nativeIsArray || function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == arrayClass || false; +}; + +module.exports = isArray; + +},{"../internals/isNative":122}],156:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result shortcuts */ +var boolClass = '[object Boolean]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** + * Checks if `value` is a boolean value. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`. + * @example + * + * _.isBoolean(null); + * // => false + */ +function isBoolean(value) { + return value === true || value === false || + value && typeof value == 'object' && toString.call(value) == boolClass || false; +} + +module.exports = isBoolean; + +},{}],157:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result shortcuts */ +var dateClass = '[object Date]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** + * Checks if `value` is a date. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a date, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + */ +function isDate(value) { + return value && typeof value == 'object' && toString.call(value) == dateClass || false; +} + +module.exports = isDate; + +},{}],158:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Checks if `value` is a DOM element. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + */ +function isElement(value) { + return value && value.nodeType === 1 || false; +} + +module.exports = isElement; + +},{}],159:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var forOwn = require('./forOwn'), + isFunction = require('./isFunction'); + +/** `Object#toString` result shortcuts */ +var argsClass = '[object Arguments]', + arrayClass = '[object Array]', + objectClass = '[object Object]', + stringClass = '[object String]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** + * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a + * length of `0` and objects with no own enumerable properties are considered + * "empty". + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if the `value` is empty, else `false`. + * @example + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({}); + * // => true + * + * _.isEmpty(''); + * // => true + */ +function isEmpty(value) { + var result = true; + if (!value) { + return result; + } + var className = toString.call(value), + length = value.length; + + if ((className == arrayClass || className == stringClass || className == argsClass ) || + (className == objectClass && typeof length == 'number' && isFunction(value.splice))) { + return !length; + } + forOwn(value, function() { + return (result = false); + }); + return result; +} + +module.exports = isEmpty; + +},{"./forOwn":149,"./isFunction":162}],160:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + baseIsEqual = require('../internals/baseIsEqual'); + +/** + * Performs a deep comparison between two values to determine if they are + * equivalent to each other. If a callback is provided it will be executed + * to compare values. If the callback returns `undefined` comparisons will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (a, b). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'name': 'fred' }; + * var copy = { 'name': 'fred' }; + * + * object == copy; + * // => false + * + * _.isEqual(object, copy); + * // => true + * + * var words = ['hello', 'goodbye']; + * var otherWords = ['hi', 'goodbye']; + * + * _.isEqual(words, otherWords, function(a, b) { + * var reGreet = /^(?:hello|hi)$/i, + * aGreet = _.isString(a) && reGreet.test(a), + * bGreet = _.isString(b) && reGreet.test(b); + * + * return (aGreet || bGreet) ? (aGreet == bGreet) : undefined; + * }); + * // => true + */ +function isEqual(a, b, callback, thisArg) { + return baseIsEqual(a, b, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 2)); +} + +module.exports = isEqual; + +},{"../internals/baseCreateCallback":100,"../internals/baseIsEqual":105}],161:[function(require,module,exports){ +(function (global){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeIsFinite = global.isFinite, + nativeIsNaN = global.isNaN; + +/** + * Checks if `value` is, or can be coerced to, a finite number. + * + * Note: This is not the same as native `isFinite` which will return true for + * booleans and empty strings. See http://es5.github.io/#x15.1.2.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is finite, else `false`. + * @example + * + * _.isFinite(-101); + * // => true + * + * _.isFinite('10'); + * // => true + * + * _.isFinite(true); + * // => false + * + * _.isFinite(''); + * // => false + * + * _.isFinite(Infinity); + * // => false + */ +function isFinite(value) { + return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value)); +} + +module.exports = isFinite; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],162:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Checks if `value` is a function. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + */ +function isFunction(value) { + return typeof value == 'function'; +} + +module.exports = isFunction; + +},{}],163:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isNumber = require('./isNumber'); + +/** + * Checks if `value` is `NaN`. + * + * Note: This is not the same as native `isNaN` which will return `true` for + * `undefined` and other non-numeric values. See http://es5.github.io/#x15.1.2.4. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ +function isNaN(value) { + // `NaN` as a primitive is the only value that is not equal to itself + // (perform the [[Class]] check first to avoid errors with some host objects in IE) + return isNumber(value) && value != +value; +} + +module.exports = isNaN; + +},{"./isNumber":165}],164:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(undefined); + * // => false + */ +function isNull(value) { + return value === null; +} + +module.exports = isNull; + +},{}],165:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result shortcuts */ +var numberClass = '[object Number]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** + * Checks if `value` is a number. + * + * Note: `NaN` is considered a number. See http://es5.github.io/#x8.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a number, else `false`. + * @example + * + * _.isNumber(8.4 * 5); + * // => true + */ +function isNumber(value) { + return typeof value == 'number' || + value && typeof value == 'object' && toString.call(value) == numberClass || false; +} + +module.exports = isNumber; + +},{}],166:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var objectTypes = require('../internals/objectTypes'); + +/** + * Checks if `value` is the language type of Object. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // check if the value is the ECMAScript language type of Object + // http://es5.github.io/#x8 + // and avoid a V8 bug + // http://code.google.com/p/v8/issues/detail?id=2291 + return !!(value && objectTypes[typeof value]); +} + +module.exports = isObject; + +},{"../internals/objectTypes":128}],167:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isNative = require('../internals/isNative'), + shimIsPlainObject = require('../internals/shimIsPlainObject'); + +/** `Object#toString` result shortcuts */ +var objectClass = '[object Object]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** Native method shortcuts */ +var getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf; + +/** + * Checks if `value` is an object created by the `Object` constructor. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * _.isPlainObject(new Shape); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + */ +var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { + if (!(value && toString.call(value) == objectClass)) { + return false; + } + var valueOf = value.valueOf, + objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); + + return objProto + ? (value == objProto || getPrototypeOf(value) == objProto) + : shimIsPlainObject(value); +}; + +module.exports = isPlainObject; + +},{"../internals/isNative":122,"../internals/shimIsPlainObject":135}],168:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result shortcuts */ +var regexpClass = '[object RegExp]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** + * Checks if `value` is a regular expression. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`. + * @example + * + * _.isRegExp(/fred/); + * // => true + */ +function isRegExp(value) { + return value && typeof value == 'object' && toString.call(value) == regexpClass || false; +} + +module.exports = isRegExp; + +},{}],169:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result shortcuts */ +var stringClass = '[object String]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** + * Checks if `value` is a string. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a string, else `false`. + * @example + * + * _.isString('fred'); + * // => true + */ +function isString(value) { + return typeof value == 'string' || + value && typeof value == 'object' && toString.call(value) == stringClass || false; +} + +module.exports = isString; + +},{}],170:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + */ +function isUndefined(value) { + return typeof value == 'undefined'; +} + +module.exports = isUndefined; + +},{}],171:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isNative = require('../internals/isNative'), + isObject = require('./isObject'), + shimKeys = require('../internals/shimKeys'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys; + +/** + * Creates an array composed of the own enumerable property names of an object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names. + * @example + * + * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); + * // => ['one', 'two', 'three'] (property order is not guaranteed across environments) + */ +var keys = !nativeKeys ? shimKeys : function(object) { + if (!isObject(object)) { + return []; + } + return nativeKeys(object); +}; + +module.exports = keys; + +},{"../internals/isNative":122,"../internals/shimKeys":136,"./isObject":166}],172:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + forOwn = require('./forOwn'); + +/** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new object with values of the results of each `callback` execution. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + * + * var characters = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // using "_.pluck" callback shorthand + * _.mapValues(characters, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } + */ +function mapValues(object, callback, thisArg) { + var result = {}; + callback = createCallback(callback, thisArg, 3); + + forOwn(object, function(value, key, object) { + result[key] = callback(value, key, object); + }); + return result; +} + +module.exports = mapValues; + +},{"../functions/createCallback":84,"./forOwn":149}],173:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + baseMerge = require('../internals/baseMerge'), + getArray = require('../internals/getArray'), + isObject = require('./isObject'), + releaseArray = require('../internals/releaseArray'), + slice = require('../internals/slice'); + +/** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * will overwrite property assignments of previous sources. If a callback is + * provided it will be executed to produce the merged values of the destination + * and source properties. If the callback returns `undefined` merging will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize merging properties. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * var names = { + * 'characters': [ + * { 'name': 'barney' }, + * { 'name': 'fred' } + * ] + * }; + * + * var ages = { + * 'characters': [ + * { 'age': 36 }, + * { 'age': 40 } + * ] + * }; + * + * _.merge(names, ages); + * // => { 'characters': [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] } + * + * var food = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var otherFood = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(food, otherFood, function(a, b) { + * return _.isArray(a) ? a.concat(b) : undefined; + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] } + */ +function merge(object) { + var args = arguments, + length = 2; + + if (!isObject(object)) { + return object; + } + // allows working with `_.reduce` and `_.reduceRight` without using + // their `index` and `collection` arguments + if (typeof args[2] != 'number') { + length = args.length; + } + if (length > 3 && typeof args[length - 2] == 'function') { + var callback = baseCreateCallback(args[--length - 1], args[length--], 2); + } else if (length > 2 && typeof args[length - 1] == 'function') { + callback = args[--length]; + } + var sources = slice(arguments, 1, length), + index = -1, + stackA = getArray(), + stackB = getArray(); + + while (++index < length) { + baseMerge(object, sources[index], callback, stackA, stackB); + } + releaseArray(stackA); + releaseArray(stackB); + return object; +} + +module.exports = merge; + +},{"../internals/baseCreateCallback":100,"../internals/baseMerge":106,"../internals/getArray":118,"../internals/releaseArray":132,"../internals/slice":137,"./isObject":166}],174:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseDifference = require('../internals/baseDifference'), + baseFlatten = require('../internals/baseFlatten'), + createCallback = require('../functions/createCallback'), + forIn = require('./forIn'); + +/** + * Creates a shallow clone of `object` excluding the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` omitting the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The properties to omit or the + * function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object without the omitted properties. + * @example + * + * _.omit({ 'name': 'fred', 'age': 40 }, 'age'); + * // => { 'name': 'fred' } + * + * _.omit({ 'name': 'fred', 'age': 40 }, function(value) { + * return typeof value == 'number'; + * }); + * // => { 'name': 'fred' } + */ +function omit(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var props = []; + forIn(object, function(value, key) { + props.push(key); + }); + props = baseDifference(props, baseFlatten(arguments, true, false, 1)); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + result[key] = object[key]; + } + } else { + callback = createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (!callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; +} + +module.exports = omit; + +},{"../functions/createCallback":84,"../internals/baseDifference":102,"../internals/baseFlatten":103,"./forIn":147}],175:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var keys = require('./keys'); + +/** + * Creates a two dimensional array of an object's key-value pairs, + * i.e. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (property order is not guaranteed across environments) + */ +function pairs(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; + +},{"./keys":171}],176:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseFlatten = require('../internals/baseFlatten'), + createCallback = require('../functions/createCallback'), + forIn = require('./forIn'), + isObject = require('./isObject'); + +/** + * Creates a shallow clone of `object` composed of the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` picking the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The function called per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object composed of the picked properties. + * @example + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, 'name'); + * // => { 'name': 'fred' } + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, function(value, key) { + * return key.charAt(0) != '_'; + * }); + * // => { 'name': 'fred' } + */ +function pick(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var index = -1, + props = baseFlatten(arguments, true, false, 1), + length = isObject(object) ? props.length : 0; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + } else { + callback = createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; +} + +module.exports = pick; + +},{"../functions/createCallback":84,"../internals/baseFlatten":103,"./forIn":147,"./isObject":166}],177:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreate = require('../internals/baseCreate'), + createCallback = require('../functions/createCallback'), + forEach = require('../collections/forEach'), + forOwn = require('./forOwn'), + isArray = require('./isArray'); + +/** + * 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 a callback, with each callback execution + * potentially mutating the `accumulator` object. The callback is bound to + * `thisArg` and invoked with four arguments; (accumulator, value, key, object). + * Callbacks may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var squares = _.transform([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], function(result, num) { + * num *= num; + * if (num % 2) { + * return result.push(num) < 3; + * } + * }); + * // => [1, 9, 25] + * + * var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ +function transform(object, callback, accumulator, thisArg) { + var isArr = isArray(object); + if (accumulator == null) { + if (isArr) { + accumulator = []; + } else { + var ctor = object && object.constructor, + proto = ctor && ctor.prototype; + + accumulator = baseCreate(proto); + } + } + if (callback) { + callback = createCallback(callback, thisArg, 4); + (isArr ? forEach : forOwn)(object, function(value, index, object) { + return callback(accumulator, value, index, object); + }); + } + return accumulator; +} + +module.exports = transform; + +},{"../collections/forEach":59,"../functions/createCallback":84,"../internals/baseCreate":99,"./forOwn":149,"./isArray":155}],178:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var keys = require('./keys'); + +/** + * Creates an array composed of the own enumerable property values of `object`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property values. + * @example + * + * _.values({ 'one': 1, 'two': 2, 'three': 3 }); + * // => [1, 2, 3] (property order is not guaranteed across environments) + */ +function values(object) { + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + result[index] = object[props[index]]; + } + return result; +} + +module.exports = values; + +},{"./keys":171}],179:[function(require,module,exports){ +(function (global){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isNative = require('./internals/isNative'); + +/** Used to detect functions containing a `this` reference */ +var reThis = /\bthis\b/; + +/** + * An object used to flag environments features. + * + * @static + * @memberOf _ + * @type Object + */ +var support = {}; + +/** + * Detect if functions can be decompiled by `Function#toString` + * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps). + * + * @memberOf _.support + * @type boolean + */ +support.funcDecomp = !isNative(global.WinRTError) && reThis.test(function() { return this; }); + +/** + * Detect if `Function#name` is supported (all but IE). + * + * @memberOf _.support + * @type boolean + */ +support.funcNames = typeof Function.name == 'string'; + +module.exports = support; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./internals/isNative":122}],180:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +module.exports = { + 'constant': require('./utilities/constant'), + 'createCallback': require('./functions/createCallback'), + 'escape': require('./utilities/escape'), + 'identity': require('./utilities/identity'), + 'mixin': require('./utilities/mixin'), + 'noConflict': require('./utilities/noConflict'), + 'noop': require('./utilities/noop'), + 'now': require('./utilities/now'), + 'parseInt': require('./utilities/parseInt'), + 'property': require('./utilities/property'), + 'random': require('./utilities/random'), + 'result': require('./utilities/result'), + 'template': require('./utilities/template'), + 'templateSettings': require('./utilities/templateSettings'), + 'times': require('./utilities/times'), + 'unescape': require('./utilities/unescape'), + 'uniqueId': require('./utilities/uniqueId') +}; + +},{"./functions/createCallback":84,"./utilities/constant":181,"./utilities/escape":182,"./utilities/identity":183,"./utilities/mixin":184,"./utilities/noConflict":185,"./utilities/noop":186,"./utilities/now":187,"./utilities/parseInt":188,"./utilities/property":189,"./utilities/random":190,"./utilities/result":191,"./utilities/template":192,"./utilities/templateSettings":193,"./utilities/times":194,"./utilities/unescape":195,"./utilities/uniqueId":196}],181:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new function. + * @example + * + * var object = { 'name': 'fred' }; + * var getter = _.constant(object); + * getter() === object; + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +module.exports = constant; + +},{}],182:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var escapeHtmlChar = require('../internals/escapeHtmlChar'), + keys = require('../objects/keys'), + reUnescapedHtml = require('../internals/reUnescapedHtml'); + +/** + * Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their + * corresponding HTML entities. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} string The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('Fred, Wilma, & Pebbles'); + * // => 'Fred, Wilma, & Pebbles' + */ +function escape(string) { + return string == null ? '' : String(string).replace(reUnescapedHtml, escapeHtmlChar); +} + +module.exports = escape; + +},{"../internals/escapeHtmlChar":116,"../internals/reUnescapedHtml":131,"../objects/keys":171}],183:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'name': 'fred' }; + * _.identity(object) === object; + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; + +},{}],184:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var forEach = require('../collections/forEach'), + functions = require('../objects/functions'), + isFunction = require('../objects/isFunction'), + isObject = require('../objects/isObject'); + +/** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ +var arrayRef = []; + +/** Native method shortcuts */ +var push = arrayRef.push; + +/** + * Adds function properties of a source object to the destination object. + * If `object` is a function methods will be added to its prototype as well. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Function|Object} [object=lodash] object The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options] The options object. + * @param {boolean} [options.chain=true] Specify whether the functions added are chainable. + * @example + * + * function capitalize(string) { + * return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); + * } + * + * _.mixin({ 'capitalize': capitalize }); + * _.capitalize('fred'); + * // => 'Fred' + * + * _('fred').capitalize().value(); + * // => 'Fred' + * + * _.mixin({ 'capitalize': capitalize }, { 'chain': false }); + * _('fred').capitalize(); + * // => 'Fred' + */ +function mixin(object, source, options) { + var chain = true, + methodNames = source && functions(source); + + if (options === false) { + chain = false; + } else if (isObject(options) && 'chain' in options) { + chain = options.chain; + } + var ctor = object, + isFunc = isFunction(ctor); + + forEach(methodNames, function(methodName) { + var func = object[methodName] = source[methodName]; + if (isFunc) { + ctor.prototype[methodName] = function() { + var chainAll = this.__chain__, + value = this.__wrapped__, + args = [value]; + + push.apply(args, arguments); + var result = func.apply(object, args); + if (chain || chainAll) { + if (value === result && isObject(result)) { + return this; + } + result = new ctor(result); + result.__chain__ = chainAll; + } + return result; + }; + } + }); +} + +module.exports = mixin; + +},{"../collections/forEach":59,"../objects/functions":151,"../objects/isFunction":162,"../objects/isObject":166}],185:[function(require,module,exports){ +(function (global){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used to restore the original `_` reference in `noConflict` */ +var oldDash = global._; + +/** + * Reverts the '_' variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @memberOf _ + * @category Utilities + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ +function noConflict() { + global._ = oldDash; + return this; +} + +module.exports = noConflict; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],186:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * A no-operation function. + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var object = { 'name': 'fred' }; + * _.noop(object) === undefined; + * // => true + */ +function noop() { + // no operation performed +} + +module.exports = noop; + +},{}],187:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isNative = require('../internals/isNative'); + +/** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var stamp = _.now(); + * _.defer(function() { console.log(_.now() - stamp); }); + * // => logs the number of milliseconds it took for the deferred function to be called + */ +var now = isNative(now = Date.now) && now || function() { + return new Date().getTime(); +}; + +module.exports = now; + +},{"../internals/isNative":122}],188:[function(require,module,exports){ +(function (global){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isString = require('../objects/isString'); + +/** Used to detect and test whitespace */ +var whitespace = ( + // whitespace + ' \t\x0B\f\xA0\ufeff' + + + // line terminators + '\n\r\u2028\u2029' + + + // unicode category "Zs" space separators + '\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000' +); + +/** Used to match leading whitespace and zeros to be removed */ +var reLeadingSpacesAndZeros = RegExp('^[' + whitespace + ']*0+(?=.$)'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeParseInt = global.parseInt; + +/** + * Converts the given value into an integer of the specified radix. + * If `radix` is `undefined` or `0` a `radix` of `10` is used unless the + * `value` is a hexadecimal, in which case a `radix` of `16` is used. + * + * Note: This method avoids differences in native ES3 and ES5 `parseInt` + * implementations. See http://es5.github.io/#E. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} value The value to parse. + * @param {number} [radix] The radix used to interpret the value to parse. + * @returns {number} Returns the new integer value. + * @example + * + * _.parseInt('08'); + * // => 8 + */ +var parseInt = nativeParseInt(whitespace + '08') == 8 ? nativeParseInt : function(value, radix) { + // Firefox < 21 and Opera < 15 follow the ES3 specified implementation of `parseInt` + return nativeParseInt(isString(value) ? value.replace(reLeadingSpacesAndZeros, '') : value, radix || 0); +}; + +module.exports = parseInt; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"../objects/isString":169}],189:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Creates a "_.pluck" style function, which returns the `key` value of a + * given object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} key The name of the property to retrieve. + * @returns {Function} Returns the new function. + * @example + * + * var characters = [ + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 36 } + * ]; + * + * var getName = _.property('name'); + * + * _.map(characters, getName); + * // => ['barney', 'fred'] + * + * _.sortBy(characters, getName); + * // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] + */ +function property(key) { + return function(object) { + return object[key]; + }; +} + +module.exports = property; + +},{}],190:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseRandom = require('../internals/baseRandom'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMin = Math.min, + nativeRandom = Math.random; + +/** + * Produces a random number between `min` and `max` (inclusive). If only one + * argument is provided a number between `0` and the given number will be + * returned. If `floating` is truey or either `min` or `max` are floats a + * floating-point number will be returned instead of an integer. + * + * @static + * @memberOf _ + * @category Utilities + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating=false] Specify returning a floating-point number. + * @returns {number} Returns a 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) { + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (typeof min == 'boolean' && noMax) { + floating = min; + min = 1; + } + else if (!noMax && typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + if (noMin && noMax) { + max = 1; + } + 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); +} + +module.exports = random; + +},{"../internals/baseRandom":107}],191:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isFunction = require('../objects/isFunction'); + +/** + * Resolves the value of property `key` on `object`. If `key` is a function + * it will be invoked with the `this` binding of `object` and its result returned, + * else the property value is returned. If `object` is falsey then `undefined` + * is returned. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to resolve. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { + * 'cheese': 'crumpets', + * 'stuff': function() { + * return 'nonsense'; + * } + * }; + * + * _.result(object, 'cheese'); + * // => 'crumpets' + * + * _.result(object, 'stuff'); + * // => 'nonsense' + */ +function result(object, key) { + if (object) { + var value = object[key]; + return isFunction(value) ? object[key]() : value; + } +} + +module.exports = result; + +},{"../objects/isFunction":162}],192:[function(require,module,exports){ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize modern exports="node" -o ./modern/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var defaults = require('../objects/defaults'), + escape = require('./escape'), + escapeStringChar = require('../internals/escapeStringChar'), + keys = require('../objects/keys'), + reInterpolate = require('../internals/reInterpolate'), + templateSettings = require('./templateSettings'), + values = require('../objects/values'); + +/** 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 ES6 template delimiters + * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals + */ +var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + +/** Used to ensure capturing order of template delimiters */ +var reNoMatch = /($^)/; + +/** Used to match unescaped characters in compiled string literals */ +var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; + +/** + * A micro-templating method that handles arbitrary delimiters, preserves + * whitespace, and correctly escapes quotes within interpolated code. + * + * Note: In the development build, `_.template` utilizes sourceURLs for easier + * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl + * + * For more information on precompiling templates see: + * http://lodash.com/custom-builds + * + * For more information on Chrome extension sandboxes see: + * http://developer.chrome.com/stable/extensions/sandboxingEval.html + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} text The template text. + * @param {Object} data The data object used to populate the text. + * @param {Object} [options] The options object. + * @param {RegExp} [options.escape] The "escape" delimiter. + * @param {RegExp} [options.evaluate] The "evaluate" delimiter. + * @param {Object} [options.imports] An object to import into the template as local variables. + * @param {RegExp} [options.interpolate] The "interpolate" delimiter. + * @param {string} [sourceURL] The sourceURL of the template's compiled source. + * @param {string} [variable] The data object variable name. + * @returns {Function|string} Returns a compiled function when no `data` object + * is given, else it returns the interpolated text. + * @example + * + * // using the "interpolate" delimiter to create a compiled template + * var compiled = _.template('hello <%= name %>'); + * compiled({ 'name': 'fred' }); + * // => 'hello fred' + * + * // using the "escape" delimiter to escape HTML in data property values + * _.template('<%- value %>', { '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: Randomnly 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. + +## Testing + +In node.js + +``` +> cd test +> node uuid.js +``` + +In Browser + +``` +open test/test.html +``` + +### Benchmarking + +Requires node.js + +``` +npm install uuid uuid-js +node test/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 + +v1.3.2: +* Improve tests and handling of v1() options (Issue #24) +* Expose RNG option to allow for perf testing with different generators + +v1.3: +* 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/xcode/node_modules/node-uuid/benchmark/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/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/xcode/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/xcode/node_modules/node-uuid/benchmark/bench.gnu b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/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/xcode/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/xcode/node_modules/node-uuid/benchmark/bench.sh b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/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/xcode/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/xcode/node_modules/node-uuid/benchmark/benchmark-native.c b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/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/xcode/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/xcode/node_modules/node-uuid/benchmark/benchmark.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/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/xcode/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/xcode/node_modules/node-uuid/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/node-uuid/package.json new file mode 100755 index 0000000..9ec4d1b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/node-uuid/package.json @@ -0,0 +1,60 @@ +{ + "name": "node-uuid", + "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", + "url": "http://github.com/broofa/node-uuid", + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "author": { + "name": "Robert Kieffer", + "email": "robert@broofa.com" + }, + "contributors": [ + { + "name": "Christoph Tavan", + "email": "dev@tavan.de" + } + ], + "lib": ".", + "main": "./uuid.js", + "repository": { + "type": "git", + "url": "git://github.com/broofa/node-uuid.git" + }, + "version": "1.3.3", + "_npmUser": { + "name": "broofa", + "email": "robert@broofa.com" + }, + "_id": "node-uuid@1.3.3", + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": "*" + }, + "_engineSupported": true, + "_npmVersion": "1.0.106", + "_nodeVersion": "v0.4.6", + "_defaultsLoaded": true, + "dist": { + "shasum": "d3db4d7b56810d9e4032342766282af07391729b", + "tarball": "http://registry.npmjs.org/node-uuid/-/node-uuid-1.3.3.tgz" + }, + "maintainers": [ + { + "name": "broofa", + "email": "robert@broofa.com" + } + ], + "directories": {}, + "_shasum": "d3db4d7b56810d9e4032342766282af07391729b", + "_from": "node-uuid@1.3.3", + "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.3.3.tgz", + "bugs": { + "url": "https://github.com/broofa/node-uuid/issues" + }, + "readme": "ERROR: No README data found!", + "homepage": "https://github.com/broofa/node-uuid" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/node-uuid/test/compare_v1.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/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/xcode/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/xcode/node_modules/node-uuid/test/test.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/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/xcode/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/xcode/node_modules/node-uuid/test/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/node-uuid/test/test.js new file mode 100755 index 0000000..be23919 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/node-uuid/test/test.js @@ -0,0 +1,240 @@ +if (!this.uuid) { + // node.js + uuid = require('../uuid'); +} + +// +// 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); + + if (version == 'v4') { + ['mathRNG', 'whatwgRNG', 'nodeRNG'].forEach(function(rng) { + if (uuid[rng]) { + var options = {rng: uuid[rng]}; + for (var i = 0, t = Date.now(); i < N; i++) generator(options); + rate('uuid.' + version + '() with ' + rng, t); + } else { + log('uuid.' + version + '() with ' + rng + ': not defined'); + } + }); + } else { + 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/xcode/node_modules/node-uuid/uuid.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/node-uuid/uuid.js new file mode 100755 index 0000000..27f1d12 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/node-uuid/uuid.js @@ -0,0 +1,249 @@ +// node-uuid/uuid.js +// +// Copyright (c) 2010 Robert Kieffer +// Dual licensed under the MIT and GPL licenses. +// Documentation and details at https://github.com/broofa/node-uuid +(function() { + var _global = this; + + // Unique ID creation requires a high quality random # generator, but + // Math.random() does not guarantee "cryptographic quality". So we feature + // detect for more robust APIs, normalizing each method to return 128-bits + // (16 bytes) of random data. + var mathRNG, nodeRNG, whatwgRNG; + + // Math.random()-based RNG. All platforms, very fast, unknown quality + var _rndBytes = new Array(16); + mathRNG = function() { + var r, b = _rndBytes, i = 0; + + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) == 0) r = Math.random() * 0x100000000; + b[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return b; + } + + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // WebKit only (currently), moderately fast, high quality + if (_global.crypto && crypto.getRandomValues) { + var _rnds = new Uint32Array(4); + whatwgRNG = function() { + crypto.getRandomValues(_rnds); + + for (var c = 0 ; c < 16; c++) { + _rndBytes[c] = _rnds[c >> 2] >>> ((c & 0x03) * 8) & 0xff; + } + return _rndBytes; + } + } + + // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html + // Node.js only, moderately fast, high quality + try { + var _rb = require('crypto').randomBytes; + nodeRNG = _rb && function() { + return _rb(16); + }; + } catch (e) {} + + // Select RNG with best quality + var _rng = nodeRNG || whatwgRNG || mathRNG; + + // Buffer class to use + var BufferClass = typeof(Buffer) == 'function' ? 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(byte) { + if (ii < 16) { // Don't overflow! + buf[i + ii++] = _hexToByte[byte]; + } + }); + + // 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; + + // Export RNG options + uuid.mathRNG = mathRNG; + uuid.nodeRNG = nodeRNG; + uuid.whatwgRNG = whatwgRNG; + + if (typeof(module) != 'undefined') { + // Play nice with node.js + module.exports = uuid; + } else { + // Play nice with browsers + var _previousRoot = _global.uuid; + + // **`noConflict()` - (browser only) to reset global 'uuid' var** + uuid.noConflict = function() { + _global.uuid = _previousRoot; + return uuid; + } + _global.uuid = uuid; + } +}()); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/pegjs/CHANGELOG b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/pegjs/CHANGELOG new file mode 100755 index 0000000..e5967cf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/pegjs/CHANGELOG @@ -0,0 +1,146 @@ +0.6.2 (2011-08-20) +------------------ + +Small Changes: + +* Reset parser position when action returns |null|. +* Fixed typo in JavaScript example grammar. + +0.6.1 (2011-04-14) +------------------ + +Small Changes: + +* Use --ascii option when generating a minified version. + +0.6.0 (2011-04-14) +------------------ + +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-ine 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 (2010-11-28) +------------------ + +Small Changes: + +* Fixed a problem where "SyntaxError: Invalid range in character class." error + appeared when using command-line version on Widnows (GH-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 (2010-06-10) +---------------- + +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). +* Fixed bug causing incorrect error messages (issue #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 (2010-04-17) +---------------- + +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 (2010-03-14) +---------------- + +* 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 (2010-03-08) +------------------ + +* Added "pegjs-" prefix to the name of the minified runtime file. + +0.2 (2010-03-08) +---------------- + +* 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 (2010-03-08) +---------------- + +* Initial release. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/pegjs/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/pegjs/LICENSE new file mode 100755 index 0000000..48ab3e5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/pegjs/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2010-2011 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/xcode/node_modules/pegjs/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/pegjs/README.md new file mode 100755 index 0000000..7a4c17e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/node_modules/pegjs/README.md @@ -0,0 +1,226 @@ +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.majda.cz/online), from the command line, or via JavaScript API + +Getting Started +--------------- + +[Online version](http://pegjs.majda.cz/online) is the easiest way to generate a parser. Just enter your grammar, try parsing few inputs, and download generated parser code. + +Installation +------------ + +### Command Line / Server-side + +To use command-line version, install [Node.js](http://nodejs.org/) and [npm](http://npmjs.org/) first. You can then install PEG.js: + + $ npm install pegjs + +Once installed, you can use the `pegjs` command to generate your parser from a grammar and use the JavaScript API from Node.js. + +### Browser + +[Download](http://pegjs.majda.cz/#download) the PEG.js library (regular or minified version) and include it in your web page or application using the ` \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js similarity index 100% rename from MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/vendor.5c22674a.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/vendor.5c22674a.js new file mode 100644 index 0000000..57e8643 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/vendor.5c22674a.js @@ -0,0 +1,13 @@ +!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&&console.log("WARNING: Tried to load angular more than once.")):(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))}}}}])}(),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(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(){console.log("Luhn::ctor");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(console.log("Luhn::check"),!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(){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),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}); \ 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.d7816846.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/styles/main.d7816846.css new file mode 100644 index 0000000..4aa81d5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/styles/main.d7816846.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}.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}.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;height:64px}.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}} \ 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/molpay-mobile-xdk-www/views/alertmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/alertmodal.html similarity index 100% rename from MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/alertmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/alertmodal.html diff --git a/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/banklistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/banklistmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/banklistmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/banklistmodal.html diff --git a/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/cardlistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/cardlistmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/cardlistmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/cardlistmodal.html diff --git a/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/channelmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/channelmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/channelmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/channelmodal.html diff --git a/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/countrylistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/countrylistmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/countrylistmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/countrylistmodal.html diff --git a/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/finalizingpayment.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/finalizingpayment.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/finalizingpayment.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/finalizingpayment.html diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/main.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/main.html similarity index 100% rename from MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/main.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/main.html diff --git a/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/paymentinfo.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/paymentinfo.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/paymentinfo.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/paymentinfo.html diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/receipt.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/receipt.html similarity index 100% rename from MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/receipt.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/views/receipt.html 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..3e87a6e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -0,0 +1,114 @@ +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", []); + }, + 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/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..c7a2cff --- /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://",molpayresulturl="https://www.onlinepayment.com.my/MOLPay/result.php",molpaynbepayurl="https://www.onlinepayment.com.my/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){isInternalDebugging&&console.log("postMolpayResultHandler innHtml = "+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),isInternalDebugging&&console.log("innHtmlString = "+b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(isInternalDebugging&&console.log("onMolpayUiFrameLoad B4 results = "+b),g=JSON.parse(b))){var h=g.tranID;h&&(isInternalDebugging&&console.log("mainUiFrame.contentWindow.transactionRequestWithTransactionId = "+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){isInternalDebugging&&console.log("onBankUiLoadstop event.url ="+a.url);var b;b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpaynbepayurl found"),bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){isInternalDebugging&&console.log("bankUiWindow window.open to window.location inject ok")}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){isInternalDebugging&&console.log("bankUiWindow window.close to window.location.assign inject ok")}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){isInternalDebugging&&console.log("onBankUiLoadstart event.url = "+a.url);var b;if(b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstart molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b),postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)){isInternalDebugging&&console.log("onBankUiLoadstart molpaynbepayurl found");var c=10,f=0,g=setInterval(function(){h()},1e3),h=function(){f++,f>c?clearInterval(g):bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b);var c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(g))})}}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){var b,c;if(a&&a.indexOf(mpopenmolpaywindow)>-1)c=new RegExp(mpopenmolpaywindow,"g"),b=a.replace(c,""),b&&b.length>0&&(isInternalDebugging&&console.log("inAppCallback base64HtmlString = ",b),createBankUiWindow(b));else if(a&&a.indexOf(mptransactionresults)>-1&&(c=new RegExp(mptransactionresults,"g"),b=a.replace(c,""),b&&b.length>0)){var d=window.atob(b),e=JSON.stringify(JSON.parse(d));transactionResultCallback(e),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(c=new RegExp(mprunscriptonpopup,"g"),b=a.replace(c,""),b&&b.length>0)){var f=window.atob(b);isInternalDebugging&&console.log("run script on popup, script ="+f),bankUiWindow.executeScript({code:f},function(a){isInternalDebugging&&console.log("run script on popup ok")})}},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isInternalDebugging&&console.log("MOLPay startmolpay paymentdetails = "+JSON.stringify(a,null,"")),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(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){isInternalDebugging&&console.log("MOLPay transactionRequest paymentdetails = "+JSON.stringify(a,null,""));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(){isClosingMolpay=!0,mainUiFrame.contentWindow.transactionRequest()};var molpay=new MOLPay;module.exports=molpay; +}); 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..06cb1c2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova-js-src/exec.js @@ -0,0 +1,253 @@ +/* + * + * 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-10106 +function handleBridgeChange() { + if (execProxy !== cordovaExec()) { + 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..ff04fb7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova.js @@ -0,0 +1,1902 @@ +// Platform: ios +// ded62dda172755defaf75378ed007dc05730ec22 +/* + 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.0.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-10106 +function handleBridgeChange() { + if (execProxy !== cordovaExec()) { + 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/shaz/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/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 similarity index 100% rename from molpay-mobile-xdk-www/views/alertmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/alertmodal.html 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/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 similarity index 100% rename from molpay-mobile-xdk-www/views/main.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/main.html 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/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 similarity index 100% rename from molpay-mobile-xdk-www/views/receipt.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/receipt.html 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..88bdbd3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova_plugins.js @@ -0,0 +1,25 @@ +cordova.define('cordova/plugin_list', function(require, exports, module) { +module.exports = [ + { + "file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js", + "id": "cordova-plugin-inappbrowser.inappbrowser", + "pluginId": "cordova-plugin-inappbrowser", + "clobbers": [ + "cordova.InAppBrowser.open", + "window.open" + ] + }, + { + "file": "plugins/molpay-mobile-xdk-cordova/molpay.js", + "id": "molpay-mobile-xdk-cordova.MOLPay", + "pluginId": "molpay-mobile-xdk-cordova", + "clobbers": [ + "molpay" + ] + } +]; +module.exports.metadata = +// TOP OF METADATA +{} +// 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 100644 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..9b4fd5d --- /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..3b67650 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/js/index.js @@ -0,0 +1,54 @@ +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' : '' + // '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 + }; + + 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/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..c013960 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/index.html @@ -0,0 +1 @@ +

    Loading.

    Please wait.

    Loading...
    \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js similarity index 100% rename from MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/scripts.465bb0ec.js diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/vendor.5c22674a.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/vendor.5c22674a.js new file mode 100644 index 0000000..57e8643 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/vendor.5c22674a.js @@ -0,0 +1,13 @@ +!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&&console.log("WARNING: Tried to load angular more than once.")):(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))}}}}])}(),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(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(){console.log("Luhn::ctor");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(console.log("Luhn::check"),!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(){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),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}); \ 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.d7816846.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/styles/main.d7816846.css new file mode 100644 index 0000000..4aa81d5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/styles/main.d7816846.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}.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}.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;height:64px}.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}} \ 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/molpay-mobile-xdk-www/views/alertmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/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/molpay-mobile-xdk-www/views/alertmodal.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/banklistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/banklistmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/banklistmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/banklistmodal.html diff --git a/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/cardlistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/cardlistmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/cardlistmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/cardlistmodal.html diff --git a/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/channelmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/channelmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/channelmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/channelmodal.html diff --git a/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/countrylistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/countrylistmodal.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/countrylistmodal.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/countrylistmodal.html diff --git a/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/finalizingpayment.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/finalizingpayment.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/finalizingpayment.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/finalizingpayment.html diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/main.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/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/molpay-mobile-xdk-www/views/main.html @@ -0,0 +1 @@ +

    MOLPay X-Platform

    \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/paymentinfo.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/paymentinfo.html similarity index 100% rename from MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/paymentinfo.html rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/paymentinfo.html diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/views/receipt.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/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/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/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..3e87a6e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -0,0 +1,114 @@ +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", []); + }, + 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/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..c7a2cff --- /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://",molpayresulturl="https://www.onlinepayment.com.my/MOLPay/result.php",molpaynbepayurl="https://www.onlinepayment.com.my/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){isInternalDebugging&&console.log("postMolpayResultHandler innHtml = "+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),isInternalDebugging&&console.log("innHtmlString = "+b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(isInternalDebugging&&console.log("onMolpayUiFrameLoad B4 results = "+b),g=JSON.parse(b))){var h=g.tranID;h&&(isInternalDebugging&&console.log("mainUiFrame.contentWindow.transactionRequestWithTransactionId = "+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){isInternalDebugging&&console.log("onBankUiLoadstop event.url ="+a.url);var b;b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstop molpaynbepayurl found"),bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){isInternalDebugging&&console.log("bankUiWindow window.open to window.location inject ok")}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){isInternalDebugging&&console.log("bankUiWindow window.close to window.location.assign inject ok")}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){isInternalDebugging&&console.log("onBankUiLoadstart event.url = "+a.url);var b;if(b=new RegExp(molpayresulturl),a&&b.test(a.url)&&(isInternalDebugging&&console.log("onBankUiLoadstart molpayresulturl found"),bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b),postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstop",d),bankUiWindow.close()})),b=new RegExp(molpaynbepayurl),a&&b.test(a.url)){isInternalDebugging&&console.log("onBankUiLoadstart molpaynbepayurl found");var c=10,f=0,g=setInterval(function(){h()},1e3),h=function(){f++,f>c?clearInterval(g):bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0];isInternalDebugging&&console.log("bankUiWindow document.body.innerHTML retrieved = "+b);var c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(g))})}}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){var b,c;if(a&&a.indexOf(mpopenmolpaywindow)>-1)c=new RegExp(mpopenmolpaywindow,"g"),b=a.replace(c,""),b&&b.length>0&&(isInternalDebugging&&console.log("inAppCallback base64HtmlString = ",b),createBankUiWindow(b));else if(a&&a.indexOf(mptransactionresults)>-1&&(c=new RegExp(mptransactionresults,"g"),b=a.replace(c,""),b&&b.length>0)){var d=window.atob(b),e=JSON.stringify(JSON.parse(d));transactionResultCallback(e),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(c=new RegExp(mprunscriptonpopup,"g"),b=a.replace(c,""),b&&b.length>0)){var f=window.atob(b);isInternalDebugging&&console.log("run script on popup, script ="+f),bankUiWindow.executeScript({code:f},function(a){isInternalDebugging&&console.log("run script on popup ok")})}},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isInternalDebugging&&console.log("MOLPay startmolpay paymentdetails = "+JSON.stringify(a,null,"")),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(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){isInternalDebugging&&console.log("MOLPay transactionRequest paymentdetails = "+JSON.stringify(a,null,""));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(){isClosingMolpay=!0,mainUiFrame.contentWindow.transactionRequest()};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..bebecec --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/platforms.json @@ -0,0 +1,4 @@ +{ + "ios": "4.0.1", + "android": "5.1.1" +} \ 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..7fef89f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/android.json @@ -0,0 +1,25 @@ +{ + "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-inappbrowser": { + "PACKAGE_NAME": "molpay.mobile.xdk.example" + }, + "cordova-plugin-privacyscreen": { + "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-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..8020ce3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/README.md @@ -0,0 +1,396 @@ + + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +# 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"); + } + +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) + + + +## 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 + +## InAppBrowser.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); }); + +## InAppBrowser.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); + +## 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.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]`. + +## InAppBrowser.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/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..3edd9c5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/RELEASENOTES.md @@ -0,0 +1,244 @@ + +# Release Notes + +### 1.4.0 (Apr 15, 2016) +* CB-7679 add fix for **iOS** upload. +* CB-10944 `NoSuchMethodError` in `InAppBrowser` plugin +* CB-10937 fix stretched icons +* CB-10760 Fixing README for display on Cordova website +* 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: 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/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..2dd46c6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/package.json @@ -0,0 +1,55 @@ +{ + "name": "cordova-plugin-inappbrowser", + "version": "1.4.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" + ], + "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": [ + { + "name": "cordova", + "version": ">=3.1.0" + } + ], + "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..1e393f9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/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/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..0263ea2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/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/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..f105a62 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowser.java @@ -0,0 +1,957 @@ +/* + 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.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.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 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 + 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); + back.setBackground(null); + back.setImageDrawable(backIcon); + back.setScaleType(ImageView.ScaleType.FIT_CENTER); + back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + 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); + forward.setBackground(null); + forward.setImageDrawable(fwdIcon); + forward.setScaleType(ImageView.ScaleType.FIT_CENTER); + forward.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + 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); + 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); + close.setBackground(null); + close.setImageDrawable(closeIcon); + close.setScaleType(ImageView.ScaleType.FIT_CENTER); + back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + 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)); + 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/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..d701720 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/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/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..6dfdd1e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/browser/InAppBrowserProxy.js @@ -0,0 +1,228 @@ +/* + * + * 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.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); + 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..c09e358 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/firefoxos/InAppBrowserProxy.js @@ -0,0 +1,187 @@ +/* + * + * 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'); + }, + + 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..6bb0ec1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/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/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..7cffac3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ios/CDVInAppBrowser.m @@ -0,0 +1,1064 @@ +/* + 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) dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion { + if ( self.presentedViewController) { + [super dismissViewControllerAnimated:flag completion:completion]; + } +} + +- (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/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..c5a9e64 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/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/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..1da4e03 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/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/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..b9880b3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/windows/InAppBrowserProxy.js @@ -0,0 +1,344 @@ +/* + * + * 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; + +// 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) { + 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) { + 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) { + 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) { + 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() { + 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..ddb5122 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/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/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..9583f9f --- /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..8ba8ee2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/tests.js @@ -0,0 +1,635 @@ +/* + * + * 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; + +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/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..25f6271 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/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/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..ed95477 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js @@ -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. + * + */ + +/*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) { + + }*/ + }, + 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..e846991 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-whitelist/README.md @@ -0,0 +1,148 @@ + + +# 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) + + +## 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. + +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. `