a zip code crypto-currency system good for red ONLY

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. var __extends = (this && this.__extends) || (function () {
  2. var extendStatics = Object.setPrototypeOf ||
  3. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  4. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  5. return function (d, b) {
  6. extendStatics(d, b);
  7. function __() { this.constructor = d; }
  8. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  9. };
  10. })();
  11. (function (factory) {
  12. if (typeof module === "object" && typeof module.exports === "object") {
  13. var v = factory(require, exports);
  14. if (v !== undefined) module.exports = v;
  15. }
  16. else if (typeof define === "function" && define.amd) {
  17. define(["require", "exports", "@angular/core", "../../config/config", "../ion", "../../util/util"], factory);
  18. }
  19. })(function (require, exports) {
  20. "use strict";
  21. Object.defineProperty(exports, "__esModule", { value: true });
  22. var core_1 = require("@angular/core");
  23. var config_1 = require("../../config/config");
  24. var ion_1 = require("../ion");
  25. var util_1 = require("../../util/util");
  26. /**
  27. * @name Spinner
  28. * @description
  29. * The `ion-spinner` component provides a variety of animated SVG spinners.
  30. * Spinners enables you to give users feedback that the app is actively
  31. * processing/thinking/waiting/chillin’ out, or whatever you’d like it to indicate.
  32. * By default, the `ion-refresher` feature uses this spinner component while it's
  33. * the refresher is in the `refreshing` state.
  34. *
  35. * Ionic offers a handful of spinners out of the box, and by default, it will use
  36. * the appropriate spinner for the platform on which it’s running.
  37. *
  38. * <table class="table spinner-table">
  39. * <tr>
  40. * <th>
  41. * <code>ios</code>
  42. * </th>
  43. * <td>
  44. * <ion-spinner name="ios"></ion-spinner>
  45. * </td>
  46. * </tr>
  47. * <tr>
  48. * <th>
  49. * <code>ios-small</code>
  50. * </th>
  51. * <td>
  52. * <ion-spinner name="ios-small"></ion-spinner>
  53. * </td>
  54. * </tr>
  55. * <tr>
  56. * <th>
  57. * <code>bubbles</code>
  58. * </th>
  59. * <td>
  60. * <ion-spinner name="bubbles"></ion-spinner>
  61. * </td>
  62. * </tr>
  63. * <tr>
  64. * <th>
  65. * <code>circles</code>
  66. * </th>
  67. * <td>
  68. * <ion-spinner name="circles"></ion-spinner>
  69. * </td>
  70. * </tr>
  71. * <tr>
  72. * <th>
  73. * <code>crescent</code>
  74. * </th>
  75. * <td>
  76. * <ion-spinner name="crescent"></ion-spinner>
  77. * </td>
  78. * </tr>
  79. * <tr>
  80. * <th>
  81. * <code>dots</code>
  82. * </th>
  83. * <td>
  84. * <ion-spinner name="dots"></ion-spinner>
  85. * </td>
  86. * </tr>
  87. * </table>
  88. *
  89. * @usage
  90. * The following code would use the default spinner for the platform it's
  91. * running from. If it's neither iOS or Android, it'll default to use `ios`.
  92. *
  93. * ```html
  94. * <ion-spinner></ion-spinner>
  95. * ```
  96. *
  97. * By setting the `name` property, you can specify which predefined spinner to
  98. * use, no matter what the platform is.
  99. *
  100. * ```html
  101. * <ion-spinner name="bubbles"></ion-spinner>
  102. * ```
  103. *
  104. * ## Styling SVG with CSS
  105. * One cool thing about SVG is its ability to be styled with CSS! One thing to note
  106. * is that some of the CSS properties on an SVG element have different names. For
  107. * example, SVG uses the term `stroke` instead of `border`, and `fill` instead
  108. * of `background-color`.
  109. *
  110. * ```css
  111. * ion-spinner * {
  112. * width: 28px;
  113. * height: 28px;
  114. * stroke: #444;
  115. * fill: #222;
  116. * }
  117. * ```
  118. */
  119. var Spinner = (function (_super) {
  120. __extends(Spinner, _super);
  121. function Spinner(config, elementRef, renderer) {
  122. var _this = _super.call(this, config, elementRef, renderer, 'spinner') || this;
  123. _this._dur = null;
  124. _this._paused = false;
  125. return _this;
  126. }
  127. Object.defineProperty(Spinner.prototype, "name", {
  128. /**
  129. * @input {string} SVG spinner name.
  130. */
  131. get: function () {
  132. return this._name;
  133. },
  134. set: function (val) {
  135. this._name = val;
  136. this.load();
  137. },
  138. enumerable: true,
  139. configurable: true
  140. });
  141. Object.defineProperty(Spinner.prototype, "duration", {
  142. /**
  143. * @input {string} How long it takes it to do one loop.
  144. */
  145. get: function () {
  146. return this._dur;
  147. },
  148. set: function (val) {
  149. this._dur = val;
  150. this.load();
  151. },
  152. enumerable: true,
  153. configurable: true
  154. });
  155. Object.defineProperty(Spinner.prototype, "paused", {
  156. /**
  157. * @input {boolean} If true, pause the animation.
  158. */
  159. get: function () {
  160. return this._paused;
  161. },
  162. set: function (val) {
  163. this._paused = util_1.isTrueProperty(val);
  164. },
  165. enumerable: true,
  166. configurable: true
  167. });
  168. /**
  169. * @hidden
  170. */
  171. Spinner.prototype.ngOnInit = function () {
  172. this._init = true;
  173. this.load();
  174. };
  175. /**
  176. * @hidden
  177. */
  178. Spinner.prototype.load = function () {
  179. if (this._init) {
  180. this._l = [];
  181. this._c = [];
  182. var name = this._name || this._config.get('spinner', 'ios');
  183. var spinner = SPINNERS[name];
  184. if (spinner) {
  185. if (spinner.lines) {
  186. for (var i = 0, l = spinner.lines; i < l; i++) {
  187. this._l.push(this._loadEle(spinner, i, l));
  188. }
  189. }
  190. else if (spinner.circles) {
  191. for (var i = 0, l = spinner.circles; i < l; i++) {
  192. this._c.push(this._loadEle(spinner, i, l));
  193. }
  194. }
  195. this.setElementClass("spinner-" + name, true);
  196. this.setElementClass("spinner-" + this._mode + "-" + name, true);
  197. }
  198. }
  199. };
  200. Spinner.prototype._loadEle = function (spinner, index, total) {
  201. var duration = this._dur || spinner.dur;
  202. var data = spinner.fn(duration, index, total);
  203. data.style.animationDuration = duration + 'ms';
  204. return data;
  205. };
  206. Spinner.decorators = [
  207. { type: core_1.Component, args: [{
  208. selector: 'ion-spinner',
  209. template: '<svg viewBox="0 0 64 64" *ngFor="let i of _c" [ngStyle]="i.style">' +
  210. '<circle [attr.r]="i.r" transform="translate(32,32)"></circle>' +
  211. '</svg>' +
  212. '<svg viewBox="0 0 64 64" *ngFor="let i of _l" [ngStyle]="i.style">' +
  213. '<line [attr.y1]="i.y1" [attr.y2]="i.y2" transform="translate(32,32)"></line>' +
  214. '</svg>',
  215. host: {
  216. '[class.spinner-paused]': '_paused'
  217. },
  218. changeDetection: core_1.ChangeDetectionStrategy.OnPush,
  219. encapsulation: core_1.ViewEncapsulation.None,
  220. },] },
  221. ];
  222. /** @nocollapse */
  223. Spinner.ctorParameters = function () { return [
  224. { type: config_1.Config, },
  225. { type: core_1.ElementRef, },
  226. { type: core_1.Renderer, },
  227. ]; };
  228. Spinner.propDecorators = {
  229. 'name': [{ type: core_1.Input },],
  230. 'duration': [{ type: core_1.Input },],
  231. 'paused': [{ type: core_1.Input },],
  232. };
  233. return Spinner;
  234. }(ion_1.Ion));
  235. exports.Spinner = Spinner;
  236. var SPINNERS = {
  237. ios: {
  238. dur: 1000,
  239. lines: 12,
  240. fn: function (dur, index, total) {
  241. var transform = 'rotate(' + (30 * index + (index < 6 ? 180 : -180)) + 'deg)';
  242. var animationDelay = -(dur - ((dur / total) * index)) + 'ms';
  243. return {
  244. y1: 17,
  245. y2: 29,
  246. style: {
  247. transform: transform,
  248. webkitTransform: transform,
  249. animationDelay: animationDelay,
  250. webkitAnimationDelay: animationDelay
  251. }
  252. };
  253. }
  254. },
  255. 'ios-small': {
  256. dur: 1000,
  257. lines: 12,
  258. fn: function (dur, index, total) {
  259. var transform = 'rotate(' + (30 * index + (index < 6 ? 180 : -180)) + 'deg)';
  260. var animationDelay = -(dur - ((dur / total) * index)) + 'ms';
  261. return {
  262. y1: 12,
  263. y2: 20,
  264. style: {
  265. transform: transform,
  266. webkitTransform: transform,
  267. animationDelay: animationDelay,
  268. webkitAnimationDelay: animationDelay
  269. }
  270. };
  271. }
  272. },
  273. bubbles: {
  274. dur: 1000,
  275. circles: 9,
  276. fn: function (dur, index, total) {
  277. var animationDelay = -(dur - ((dur / total) * index)) + 'ms';
  278. return {
  279. r: 5,
  280. style: {
  281. top: (9 * Math.sin(2 * Math.PI * index / total)) + 'px',
  282. left: (9 * Math.cos(2 * Math.PI * index / total)) + 'px',
  283. animationDelay: animationDelay,
  284. webkitAnimationDelay: animationDelay
  285. }
  286. };
  287. }
  288. },
  289. circles: {
  290. dur: 1000,
  291. circles: 8,
  292. fn: function (dur, index, total) {
  293. var animationDelay = -(dur - ((dur / total) * index)) + 'ms';
  294. return {
  295. r: 5,
  296. style: {
  297. top: (9 * Math.sin(2 * Math.PI * index / total)) + 'px',
  298. left: (9 * Math.cos(2 * Math.PI * index / total)) + 'px',
  299. animationDelay: animationDelay,
  300. webkitAnimationDelay: animationDelay
  301. }
  302. };
  303. }
  304. },
  305. crescent: {
  306. dur: 750,
  307. circles: 1,
  308. fn: function () {
  309. return {
  310. r: 26,
  311. style: {}
  312. };
  313. }
  314. },
  315. dots: {
  316. dur: 750,
  317. circles: 3,
  318. fn: function (_dur, index) {
  319. var animationDelay = -(110 * index) + 'ms';
  320. return {
  321. r: 6,
  322. style: {
  323. left: (9 - (9 * index)) + 'px',
  324. animationDelay: animationDelay,
  325. webkitAnimationDelay: animationDelay
  326. }
  327. };
  328. }
  329. }
  330. };
  331. });
  332. //# sourceMappingURL=spinner.js.map