@alisaitteke/seatmap-canvas 2.1.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/LICENSE +1 -1
  3. package/README.md +18 -10
  4. package/dist/cjs/seatmap.canvas.css +151 -0
  5. package/dist/cjs/seatmap.canvas.js +40 -0
  6. package/dist/cjs/seatmap.canvas.js.map +1 -0
  7. package/dist/cjs/types/canvas.index.browser.d.ts +2 -0
  8. package/dist/cjs/types/canvas.index.d.ts +23 -0
  9. package/dist/cjs/types/config.d.ts +3 -0
  10. package/dist/cjs/types/decorators/dom.d.ts +8 -0
  11. package/dist/cjs/types/decorators/index.d.ts +1 -0
  12. package/dist/cjs/types/dev.tools.d.ts +6 -0
  13. package/{src/lib/enums/global.ts → dist/cjs/types/enums/global.d.ts} +6 -27
  14. package/dist/cjs/types/models/block.model.d.ts +29 -0
  15. package/dist/cjs/types/models/coordinate.model.d.ts +7 -0
  16. package/dist/cjs/types/models/data.model.d.ts +26 -0
  17. package/dist/cjs/types/models/defaults.model.d.ts +32 -0
  18. package/dist/cjs/types/models/global.model.d.ts +18 -0
  19. package/dist/cjs/types/models/label.model.d.ts +9 -0
  20. package/dist/cjs/types/models/legend.model.d.ts +8 -0
  21. package/dist/cjs/types/models/model.base.d.ts +5 -0
  22. package/dist/cjs/types/models/seat.model.d.ts +40 -0
  23. package/dist/cjs/types/models/styles/block.style.d.ts +7 -0
  24. package/dist/cjs/types/models/styles/label.style.d.ts +6 -0
  25. package/dist/cjs/types/models/styles/legend.style.d.ts +6 -0
  26. package/dist/cjs/types/models/styles/seat.style.d.ts +12 -0
  27. package/dist/cjs/types/models/styles/tooltip.style.d.ts +7 -0
  28. package/dist/cjs/types/svg/event.manager.d.ts +12 -0
  29. package/dist/cjs/types/svg/legend/legend.circle.d.ts +7 -0
  30. package/dist/cjs/types/svg/legend/legend.item.d.ts +13 -0
  31. package/dist/cjs/types/svg/legend/legend.title.d.ts +7 -0
  32. package/dist/cjs/types/svg/legend.d.ts +8 -0
  33. package/dist/cjs/types/svg/stage/blocks/block-item/block-item.bounds.d.ts +12 -0
  34. package/dist/cjs/types/svg/stage/blocks/block-item/block-item.index.d.ts +23 -0
  35. package/dist/cjs/types/svg/stage/blocks/block-item/block-item.info.index.d.ts +11 -0
  36. package/dist/cjs/types/svg/stage/blocks/block-item/block-item.labels.index.d.ts +11 -0
  37. package/dist/cjs/types/svg/stage/blocks/block-item/block-item.mask.d.ts +12 -0
  38. package/dist/cjs/types/svg/stage/blocks/block-item/block-item.seats.index.d.ts +15 -0
  39. package/dist/cjs/types/svg/stage/blocks/block-item/bound/bound-item.index.d.ts +12 -0
  40. package/dist/cjs/types/svg/stage/blocks/block-item/info/title.d.ts +7 -0
  41. package/dist/cjs/types/svg/stage/blocks/block-item/label/label-item.circle.d.ts +7 -0
  42. package/dist/cjs/types/svg/stage/blocks/block-item/label/label-item.index.d.ts +13 -0
  43. package/dist/cjs/types/svg/stage/blocks/block-item/label/label-item.title.d.ts +7 -0
  44. package/dist/cjs/types/svg/stage/blocks/block-item/seat/seat-item.check.d.ts +10 -0
  45. package/dist/cjs/types/svg/stage/blocks/block-item/seat/seat-item.circle.d.ts +7 -0
  46. package/dist/cjs/types/svg/stage/blocks/block-item/seat/seat-item.index.d.ts +28 -0
  47. package/dist/cjs/types/svg/stage/blocks/block-item/seat/seat-item.title.d.ts +7 -0
  48. package/dist/cjs/types/svg/stage/blocks/blocks.index.d.ts +13 -0
  49. package/dist/cjs/types/svg/stage/blocks.search-circle.d.ts +12 -0
  50. package/dist/cjs/types/svg/stage/multi-select/rect.d.ts +7 -0
  51. package/dist/cjs/types/svg/stage/multi-select.d.ts +13 -0
  52. package/dist/cjs/types/svg/stage/search-circle/circle.d.ts +7 -0
  53. package/dist/cjs/types/svg/stage/stage.index.d.ts +11 -0
  54. package/dist/cjs/types/svg/svg.base.d.ts +35 -0
  55. package/dist/cjs/types/svg/svg.index.d.ts +16 -0
  56. package/dist/cjs/types/svg/tooltip/rect.d.ts +8 -0
  57. package/dist/cjs/types/svg/tooltip/title.d.ts +10 -0
  58. package/dist/cjs/types/svg/tooltip.d.ts +15 -0
  59. package/dist/cjs/types/svg/zoom-out.bg.d.ts +7 -0
  60. package/dist/cjs/types/svg/zoom.manager.d.ts +41 -0
  61. package/dist/cjs/types/window.manager.d.ts +9 -0
  62. package/dist/dependencies.txt +849 -0
  63. package/dist/esm/seatmap.canvas.css +151 -0
  64. package/dist/esm/seatmap.canvas.js +16 -0
  65. package/dist/esm/seatmap.canvas.js.map +1 -0
  66. package/dist/esm/types/canvas.index.browser.d.ts +2 -0
  67. package/dist/esm/types/canvas.index.d.ts +23 -0
  68. package/dist/esm/types/config.d.ts +3 -0
  69. package/dist/esm/types/decorators/dom.d.ts +8 -0
  70. package/dist/esm/types/decorators/index.d.ts +1 -0
  71. package/dist/esm/types/dev.tools.d.ts +6 -0
  72. package/dist/esm/types/enums/global.d.ts +46 -0
  73. package/dist/esm/types/models/block.model.d.ts +29 -0
  74. package/dist/esm/types/models/coordinate.model.d.ts +7 -0
  75. package/dist/esm/types/models/data.model.d.ts +26 -0
  76. package/dist/esm/types/models/defaults.model.d.ts +32 -0
  77. package/dist/esm/types/models/global.model.d.ts +18 -0
  78. package/dist/esm/types/models/label.model.d.ts +9 -0
  79. package/dist/esm/types/models/legend.model.d.ts +8 -0
  80. package/dist/esm/types/models/model.base.d.ts +5 -0
  81. package/dist/esm/types/models/seat.model.d.ts +40 -0
  82. package/dist/esm/types/models/styles/block.style.d.ts +7 -0
  83. package/dist/esm/types/models/styles/label.style.d.ts +6 -0
  84. package/dist/esm/types/models/styles/legend.style.d.ts +6 -0
  85. package/dist/esm/types/models/styles/seat.style.d.ts +12 -0
  86. package/dist/esm/types/models/styles/tooltip.style.d.ts +7 -0
  87. package/dist/esm/types/svg/event.manager.d.ts +12 -0
  88. package/dist/esm/types/svg/legend/legend.circle.d.ts +7 -0
  89. package/dist/esm/types/svg/legend/legend.item.d.ts +13 -0
  90. package/dist/esm/types/svg/legend/legend.title.d.ts +7 -0
  91. package/dist/esm/types/svg/legend.d.ts +8 -0
  92. package/dist/esm/types/svg/stage/blocks/block-item/block-item.bounds.d.ts +12 -0
  93. package/dist/esm/types/svg/stage/blocks/block-item/block-item.index.d.ts +23 -0
  94. package/dist/esm/types/svg/stage/blocks/block-item/block-item.info.index.d.ts +11 -0
  95. package/dist/esm/types/svg/stage/blocks/block-item/block-item.labels.index.d.ts +11 -0
  96. package/dist/esm/types/svg/stage/blocks/block-item/block-item.mask.d.ts +12 -0
  97. package/dist/esm/types/svg/stage/blocks/block-item/block-item.seats.index.d.ts +15 -0
  98. package/dist/esm/types/svg/stage/blocks/block-item/bound/bound-item.index.d.ts +12 -0
  99. package/dist/esm/types/svg/stage/blocks/block-item/info/title.d.ts +7 -0
  100. package/dist/esm/types/svg/stage/blocks/block-item/label/label-item.circle.d.ts +7 -0
  101. package/dist/esm/types/svg/stage/blocks/block-item/label/label-item.index.d.ts +13 -0
  102. package/dist/esm/types/svg/stage/blocks/block-item/label/label-item.title.d.ts +7 -0
  103. package/dist/esm/types/svg/stage/blocks/block-item/seat/seat-item.check.d.ts +10 -0
  104. package/dist/esm/types/svg/stage/blocks/block-item/seat/seat-item.circle.d.ts +7 -0
  105. package/dist/esm/types/svg/stage/blocks/block-item/seat/seat-item.index.d.ts +28 -0
  106. package/dist/esm/types/svg/stage/blocks/block-item/seat/seat-item.title.d.ts +7 -0
  107. package/dist/esm/types/svg/stage/blocks/blocks.index.d.ts +13 -0
  108. package/dist/esm/types/svg/stage/blocks.search-circle.d.ts +12 -0
  109. package/dist/esm/types/svg/stage/multi-select/rect.d.ts +7 -0
  110. package/dist/esm/types/svg/stage/multi-select.d.ts +13 -0
  111. package/dist/esm/types/svg/stage/search-circle/circle.d.ts +7 -0
  112. package/dist/esm/types/svg/stage/stage.index.d.ts +11 -0
  113. package/dist/esm/types/svg/svg.base.d.ts +35 -0
  114. package/dist/esm/types/svg/svg.index.d.ts +16 -0
  115. package/dist/esm/types/svg/tooltip/rect.d.ts +8 -0
  116. package/dist/esm/types/svg/tooltip/title.d.ts +10 -0
  117. package/dist/esm/types/svg/tooltip.d.ts +15 -0
  118. package/dist/esm/types/svg/zoom-out.bg.d.ts +7 -0
  119. package/dist/esm/types/svg/zoom.manager.d.ts +41 -0
  120. package/dist/esm/types/window.manager.d.ts +9 -0
  121. package/dist/types.d.ts +533 -0
  122. package/package.json +25 -22
  123. package/.eslintrc.json +0 -15
  124. package/.github/FUNDING.yml +0 -4
  125. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
  126. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  127. package/.github/workflows/codeql-analysis.yml +0 -29
  128. package/.github/workflows/npm-publish-packages.yml +0 -35
  129. package/.github/workflows/publish.yml +0 -103
  130. package/.github/workflows/webpack.yml +0 -22
  131. package/.opencommitignore +0 -4
  132. package/AUTHORS +0 -3
  133. package/SECURITY.md +0 -21
  134. package/_config.yml +0 -1
  135. package/assets/banner_ui.png +0 -0
  136. package/assets/bn.jpg +0 -0
  137. package/assets/logo.jpg +0 -0
  138. package/assets/logo_small.jpg +0 -0
  139. package/assets/zoom_out.svg +0 -11
  140. package/cog.toml +0 -19
  141. package/dist/seatmap.canvas.2.0.1-0.css +0 -1
  142. package/dist/seatmap.canvas.2.0.1-0.js +0 -2
  143. package/dist/seatmap.canvas.2.0.1-0.js.LICENSE.txt +0 -14
  144. package/examples/basic/bootstrap.min.css +0 -7
  145. package/examples/basic/index.html +0 -201
  146. package/examples/basic/jquery.min.js +0 -2
  147. package/examples/data/data.json +0 -70007
  148. package/examples/data/small.json +0 -1307
  149. package/examples/data/tiny.json +0 -119
  150. package/examples/old/index.html +0 -262
  151. package/src/lib/canvas.index.ts +0 -122
  152. package/src/lib/config.ts +0 -11
  153. package/src/lib/decorators/dom.ts +0 -40
  154. package/src/lib/decorators/index.ts +0 -6
  155. package/src/lib/dev.tools.ts +0 -18
  156. package/src/lib/models/block.model.ts +0 -170
  157. package/src/lib/models/coordinate.model.ts +0 -43
  158. package/src/lib/models/data.model.ts +0 -105
  159. package/src/lib/models/defaults.model.ts +0 -125
  160. package/src/lib/models/global.model.ts +0 -24
  161. package/src/lib/models/label.model.ts +0 -58
  162. package/src/lib/models/legend.model.ts +0 -56
  163. package/src/lib/models/model.base.ts +0 -32
  164. package/src/lib/models/seat.model.ts +0 -182
  165. package/src/lib/svg/event.manager.ts +0 -56
  166. package/src/lib/svg/legend/legend.circle.ts +0 -28
  167. package/src/lib/svg/legend/legend.item.ts +0 -50
  168. package/src/lib/svg/legend/legend.title.ts +0 -27
  169. package/src/lib/svg/legend.ts +0 -55
  170. package/src/lib/svg/stage/blocks/block-item/block-item.bounds.ts +0 -51
  171. package/src/lib/svg/stage/blocks/block-item/block-item.index.ts +0 -173
  172. package/src/lib/svg/stage/blocks/block-item/block-item.info.index.ts +0 -38
  173. package/src/lib/svg/stage/blocks/block-item/block-item.labels.index.ts +0 -41
  174. package/src/lib/svg/stage/blocks/block-item/block-item.mask.ts +0 -67
  175. package/src/lib/svg/stage/blocks/block-item/block-item.seats.index.ts +0 -81
  176. package/src/lib/svg/stage/blocks/block-item/bound/bound-item.index.ts +0 -43
  177. package/src/lib/svg/stage/blocks/block-item/info/title.ts +0 -30
  178. package/src/lib/svg/stage/blocks/block-item/label/label-item.circle.ts +0 -27
  179. package/src/lib/svg/stage/blocks/block-item/label/label-item.index.ts +0 -46
  180. package/src/lib/svg/stage/blocks/block-item/label/label-item.title.ts +0 -27
  181. package/src/lib/svg/stage/blocks/block-item/seat/seat-item.check.ts +0 -45
  182. package/src/lib/svg/stage/blocks/block-item/seat/seat-item.circle.ts +0 -30
  183. package/src/lib/svg/stage/blocks/block-item/seat/seat-item.index.ts +0 -159
  184. package/src/lib/svg/stage/blocks/block-item/seat/seat-item.title.ts +0 -27
  185. package/src/lib/svg/stage/blocks/blocks.index.ts +0 -68
  186. package/src/lib/svg/stage/blocks.search-circle.ts +0 -86
  187. package/src/lib/svg/stage/multi-select/rect.ts +0 -36
  188. package/src/lib/svg/stage/multi-select.ts +0 -107
  189. package/src/lib/svg/stage/search-circle/circle.ts +0 -37
  190. package/src/lib/svg/stage/stage.index.ts +0 -41
  191. package/src/lib/svg/svg.base.ts +0 -217
  192. package/src/lib/svg/svg.index.ts +0 -76
  193. package/src/lib/svg/tooltip/rect.ts +0 -66
  194. package/src/lib/svg/tooltip/title.ts +0 -57
  195. package/src/lib/svg/tooltip.ts +0 -92
  196. package/src/lib/svg/zoom-out.bg.ts +0 -35
  197. package/src/lib/svg/zoom.manager.ts +0 -440
  198. package/src/lib/window.manager.ts +0 -40
  199. package/src/scss/lib.scss +0 -10
  200. package/src/scss/style.scss +0 -221
  201. package/tsconfig.json +0 -28
  202. package/webpack.environments/development.js +0 -58
  203. package/webpack.environments/production.js +0 -52
@@ -0,0 +1,151 @@
1
+ .multi-select-enable .seatmap-svg .stage .blocks .block {
2
+ cursor: crosshair;
3
+ }
4
+ .multi-select-enable .seatmap-svg .stage .blocks .block .masks .seat-level-mask {
5
+ cursor: crosshair !important;
6
+ }
7
+ .multi-select-enable .seatmap-svg .stage .blocks .block .seats .seat {
8
+ cursor: crosshair;
9
+ }
10
+ .multi-select-enable .seatmap-svg .stage .blocks .block .seats .seat.selected {
11
+ cursor: crosshair;
12
+ }
13
+
14
+ .seatmap-svg {
15
+ position: relative;
16
+ width: 100%;
17
+ height: 100%;
18
+ }
19
+ .seatmap-svg.zoom-level-SEAT .stage .blocks .block .masks .seat-level-mask {
20
+ cursor: none;
21
+ }
22
+ .seatmap-svg.zoom-level-BLOCK .stage .blocks .block .masks .seat-level-mask {
23
+ cursor: none;
24
+ }
25
+ .seatmap-svg.zoom-level-VENUE .stage .blocks .block {
26
+ filter: drop-shadow(0px 0px 10px rgba(0, 0, 0, 0.61));
27
+ }
28
+ .seatmap-svg.zoom-level-VENUE .stage .blocks .block:hover {
29
+ transform: scale(1.02);
30
+ filter: drop-shadow(0px 0px 14px rgba(0, 0, 0, 0.7));
31
+ }
32
+ .seatmap-svg.zoom-level-VENUE .stage .blocks .block .masks .seat-level-mask {
33
+ cursor: none;
34
+ }
35
+ .seatmap-svg .zoom-out-bg {
36
+ cursor: zoom-out;
37
+ fill: transparent;
38
+ }
39
+ .seatmap-svg .stage .blocks .block {
40
+ cursor: pointer;
41
+ transition-property: transform, filter;
42
+ transition-duration: 0.17s;
43
+ transition-timing-function: ease-in-out;
44
+ filter: drop-shadow(0px 0px 3px rgba(0, 0, 0, 0));
45
+ }
46
+ .seatmap-svg .stage .blocks .block .bounds .block-hull-border {
47
+ stroke-linejoin: round;
48
+ opacity: 0.5;
49
+ }
50
+ .seatmap-svg .stage .blocks .block .bounds .block-hull {
51
+ stroke-linejoin: round;
52
+ cursor: move;
53
+ }
54
+ .seatmap-svg .stage .blocks .block .masks .venue-level-mask {
55
+ transition-property: opacity;
56
+ transition-duration: 0.5s;
57
+ transition-delay: 0.2s;
58
+ transition-timing-function: ease-in-out;
59
+ stroke-linejoin: round;
60
+ opacity: 1;
61
+ }
62
+ .seatmap-svg .stage .blocks .block .masks .block-level-mask {
63
+ transition-property: opacity;
64
+ transition-duration: 0.5s;
65
+ transition-delay: 0.2s;
66
+ transition-timing-function: ease-in-out;
67
+ stroke-linejoin: round;
68
+ opacity: 0.7;
69
+ }
70
+ .seatmap-svg .stage .blocks .block .masks .seat-level-mask {
71
+ transition-property: opacity;
72
+ transition-duration: 0.5s;
73
+ transition-delay: 0.2s;
74
+ transition-timing-function: ease-in-out;
75
+ stroke-linejoin: round;
76
+ opacity: 0;
77
+ }
78
+ .seatmap-svg .stage .blocks .block .masks .bound-hide {
79
+ transition-property: opacity;
80
+ transition-duration: 0.5s;
81
+ transition-delay: 0.2s;
82
+ transition-timing-function: ease-in-out;
83
+ pointer-events: none;
84
+ opacity: 0;
85
+ }
86
+ .seatmap-svg .stage .blocks .block .info .title {
87
+ text-anchor: middle;
88
+ dominant-baseline: central;
89
+ pointer-events: none;
90
+ }
91
+ .seatmap-svg .stage .blocks .block .seats .seat {
92
+ cursor: copy;
93
+ }
94
+ .seatmap-svg .stage .blocks .block .seats .seat.selected {
95
+ cursor: pointer;
96
+ }
97
+ .seatmap-svg .stage .blocks .block .seats .seat .label-text {
98
+ text-anchor: middle;
99
+ dominant-baseline: central;
100
+ }
101
+ .seatmap-svg .stage .blocks .block .labels .label circle {
102
+ stroke: rgba(0, 0, 0, 0.2);
103
+ }
104
+ .seatmap-svg .stage .blocks .block .labels .label .label-text {
105
+ text-anchor: middle;
106
+ dominant-baseline: central;
107
+ }
108
+ .seatmap-svg .stage .blocks .block .zoom-layers-container .zoom-layer-hull {
109
+ stroke-width: 80px;
110
+ stroke-linejoin: round;
111
+ }
112
+ @media (any-pointer: coarse) {
113
+ .seatmap-svg .stage .blocks .search-circle {
114
+ display: none;
115
+ }
116
+ }
117
+ .seatmap-svg .stage .search-circle {
118
+ opacity: 0;
119
+ transition-property: opacity;
120
+ transition-duration: 0.2s;
121
+ transition-delay: 0;
122
+ transition-timing-function: ease-in-out;
123
+ }
124
+ .seatmap-svg .stage .search-circle .circle {
125
+ fill: rgba(0, 0, 0, 0);
126
+ pointer-events: none;
127
+ stroke: rgba(0, 0, 0, 0.4);
128
+ stroke-width: 4px;
129
+ }
130
+ .seatmap-svg .stage .search-circle.hide {
131
+ transition-property: opacity;
132
+ transition-duration: 0.2s;
133
+ transition-delay: 0;
134
+ transition-timing-function: ease-in-out;
135
+ opacity: 0;
136
+ }
137
+ .seatmap-svg .stage .search-circle.show {
138
+ transition-property: opacity;
139
+ transition-duration: 0.2s;
140
+ transition-delay: 0;
141
+ transition-timing-function: ease-in-out;
142
+ opacity: 1;
143
+ }
144
+ .seatmap-svg .legend .legend-item circle {
145
+ stroke: #adadad;
146
+ stroke-width: 1px;
147
+ }
148
+ .seatmap-svg .legend .legend-item text {
149
+ text-anchor: start;
150
+ dominant-baseline: central;
151
+ }
@@ -0,0 +1,16 @@
1
+ var t="http://www.w3.org/1999/xhtml",e={svg:"http://www.w3.org/2000/svg",xhtml:t,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function n(t){var n=t+="",i=n.indexOf(":");return i>=0&&"xmlns"!==(n=t.slice(0,i))&&(t=t.slice(i+1)),e.hasOwnProperty(n)?{space:e[n],local:t}:t}function i(e){return function(){var n=this.ownerDocument,i=this.namespaceURI;return i===t&&n.documentElement.namespaceURI===t?n.createElement(e):n.createElementNS(i,e)}}function o(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function r(t){var e=n(t);return(e.local?o:i)(e)}function s(){}function a(t){return null==t?s:function(){return this.querySelector(t)}}function l(){return[]}function u(t){return null==t?l:function(){return this.querySelectorAll(t)}}function c(t){return function(){return this.matches(t)}}function h(t){return new Array(t.length)}function f(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}f.prototype={constructor:f,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var d="$";function p(t,e,n,i,o,r){for(var s,a=0,l=e.length,u=r.length;a<u;++a)(s=e[a])?(s.__data__=r[a],i[a]=s):n[a]=new f(t,r[a]);for(;a<l;++a)(s=e[a])&&(o[a]=s)}function g(t,e,n,i,o,r,s){var a,l,u,c={},h=e.length,p=r.length,g=new Array(h);for(a=0;a<h;++a)(l=e[a])&&(g[a]=u=d+s.call(l,l.__data__,a,e),u in c?o[a]=l:c[u]=l);for(a=0;a<p;++a)(l=c[u=d+s.call(t,r[a],a,r)])?(i[a]=l,l.__data__=r[a],c[u]=null):n[a]=new f(t,r[a]);for(a=0;a<h;++a)(l=e[a])&&c[g[a]]===l&&(o[a]=l)}function m(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function _(t){return function(){this.removeAttribute(t)}}function v(t){return function(){this.removeAttributeNS(t.space,t.local)}}function y(t,e){return function(){this.setAttribute(t,e)}}function b(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function w(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function E(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function x(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function k(t){return function(){this.style.removeProperty(t)}}function M(t,e,n){return function(){this.style.setProperty(t,e,n)}}function L(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function T(t,e){return t.style.getPropertyValue(e)||x(t).getComputedStyle(t,null).getPropertyValue(e)}function z(t){return function(){delete this[t]}}function C(t,e){return function(){this[t]=e}}function O(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function S(t){return t.trim().split(/^|\s+/)}function A(t){return t.classList||new B(t)}function B(t){this._node=t,this._names=S(t.getAttribute("class")||"")}function N(t,e){for(var n=A(t),i=-1,o=e.length;++i<o;)n.add(e[i])}function U(t,e){for(var n=A(t),i=-1,o=e.length;++i<o;)n.remove(e[i])}function V(t){return function(){N(this,t)}}function I(t){return function(){U(this,t)}}function K(t,e){return function(){(e.apply(this,arguments)?N:U)(this,t)}}function G(){this.textContent=""}function D(t){return function(){this.textContent=t}}function P(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function R(){this.innerHTML=""}function j(t){return function(){this.innerHTML=t}}function Z(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function H(){this.nextSibling&&this.parentNode.appendChild(this)}function Y(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function q(){return null}function X(){var t=this.parentNode;t&&t.removeChild(this)}function W(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function F(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}B.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var $={},J=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||($={mouseenter:"mouseover",mouseleave:"mouseout"}));function Q(t,e,n){return t=tt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function tt(t,e,n){return function(i){var o=J;J=i;try{t.call(this,this.__data__,e,n)}finally{J=o}}}function et(t){return function(){var e=this.__on;if(e){for(var n,i=0,o=-1,r=e.length;i<r;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.capture);++o?e.length=o:delete this.__on}}}function nt(t,e,n){var i=$.hasOwnProperty(t.type)?Q:tt;return function(o,r,s){var a,l=this.__on,u=i(e,r,s);if(l)for(var c=0,h=l.length;c<h;++c)if((a=l[c]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=u,a.capture=n),void(a.value=e);this.addEventListener(t.type,u,n),a={type:t.type,name:t.name,value:e,listener:u,capture:n},l?l.push(a):this.__on=[a]}}function it(t,e,n){var i=x(t),o=i.CustomEvent;"function"==typeof o?o=new o(e,n):(o=i.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function ot(t,e){return function(){return it(this,t,e)}}function rt(t,e){return function(){return it(this,t,e.apply(this,arguments))}}var st=[null];function at(t,e){this._groups=t,this._parents=e}function lt(){return new at([[document.documentElement]],st)}function ut(t){return"string"==typeof t?new at([[document.querySelector(t)]],[document.documentElement]):new at([[t]],st)}function ct(){for(var t,e=J;t=e.sourceEvent;)e=t;return e}function ht(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}function ft(t){var e=ct();return e.changedTouches&&(e=e.changedTouches[0]),ht(t,e)}function dt(t,e,n){arguments.length<3&&(n=e,e=ct().changedTouches);for(var i,o=0,r=e?e.length:0;o<r;++o)if((i=e[o]).identifier===n)return ht(t,i);return null}
2
+ /*! *****************************************************************************
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
15
+ ***************************************************************************** */at.prototype=lt.prototype={constructor:at,select:function(t){"function"!=typeof t&&(t=a(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var r,s,l=e[o],u=l.length,c=i[o]=new Array(u),h=0;h<u;++h)(r=l[h])&&(s=t.call(r,r.__data__,h,l))&&("__data__"in r&&(s.__data__=r.__data__),c[h]=s);return new at(i,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=u(t));for(var e=this._groups,n=e.length,i=[],o=[],r=0;r<n;++r)for(var s,a=e[r],l=a.length,c=0;c<l;++c)(s=a[c])&&(i.push(t.call(s,s.__data__,c,a)),o.push(s));return new at(i,o)},filter:function(t){"function"!=typeof t&&(t=c(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var r,s=e[o],a=s.length,l=i[o]=[],u=0;u<a;++u)(r=s[u])&&t.call(r,r.__data__,u,s)&&l.push(r);return new at(i,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),u=-1,this.each((function(t){d[++u]=t})),d;var n=e?g:p,i=this._parents,o=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var r=o.length,s=new Array(r),a=new Array(r),l=new Array(r),u=0;u<r;++u){var c=i[u],h=o[u],f=h.length,d=t.call(c,c&&c.__data__,u,i),m=d.length,_=a[u]=new Array(m),v=s[u]=new Array(m);n(c,h,_,v,l[u]=new Array(f),d,e);for(var y,b,w=0,E=0;w<m;++w)if(y=_[w]){for(w>=E&&(E=w+1);!(b=v[E])&&++E<m;);y._next=b||null}}return(s=new at(s,i))._enter=a,s._exit=l,s},enter:function(){return new at(this._enter||this._groups.map(h),this._parents)},exit:function(){return new at(this._exit||this._groups.map(h),this._parents)},join:function(t,e,n){var i=this.enter(),o=this,r=this.exit();return i="function"==typeof t?t(i):i.append(t+""),null!=e&&(o=e(o)),null==n?r.remove():n(r),i&&o?i.merge(o).order():o},merge:function(t){for(var e=this._groups,n=t._groups,i=e.length,o=n.length,r=Math.min(i,o),s=new Array(i),a=0;a<r;++a)for(var l,u=e[a],c=n[a],h=u.length,f=s[a]=new Array(h),d=0;d<h;++d)(l=u[d]||c[d])&&(f[d]=l);for(;a<i;++a)s[a]=e[a];return new at(s,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,o=t[e],r=o.length-1,s=o[r];--r>=0;)(i=o[r])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=m);for(var n=this._groups,i=n.length,o=new Array(i),r=0;r<i;++r){for(var s,a=n[r],l=a.length,u=o[r]=new Array(l),c=0;c<l;++c)(s=a[c])&&(u[c]=s);u.sort(e)}return new at(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],o=0,r=i.length;o<r;++o){var s=i[o];if(s)return s}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var o,r=e[n],s=0,a=r.length;s<a;++s)(o=r[s])&&t.call(o,o.__data__,s,r);return this},attr:function(t,e){var i=n(t);if(arguments.length<2){var o=this.node();return i.local?o.getAttributeNS(i.space,i.local):o.getAttribute(i)}return this.each((null==e?i.local?v:_:"function"==typeof e?i.local?E:w:i.local?b:y)(i,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?k:"function"==typeof e?L:M)(t,e,null==n?"":n)):T(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?z:"function"==typeof e?O:C)(t,e)):this.node()[t]},classed:function(t,e){var n=S(t+"");if(arguments.length<2){for(var i=A(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?K:e?V:I)(n,e))},text:function(t){return arguments.length?this.each(null==t?G:("function"==typeof t?P:D)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?R:("function"==typeof t?Z:j)(t)):this.node().innerHTML},raise:function(){return this.each(H)},lower:function(){return this.each(Y)},append:function(t){var e="function"==typeof t?t:r(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:r(t),i=null==e?q:"function"==typeof e?e:a(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(X)},clone:function(t){return this.select(t?F:W)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,o,r=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),s=r.length;if(!(arguments.length<2)){for(a=e?nt:et,null==n&&(n=!1),i=0;i<s;++i)this.each(a(r[i],e,n));return this}var a=this.node().__on;if(a)for(var l,u=0,c=a.length;u<c;++u)for(i=0,l=a[u];i<s;++i)if((o=r[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?rt:ot)(t,e))}};var pt=function(t,e){return pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},pt(t,e)};function gt(t,e){function n(){this.constructor=t}pt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function mt(t,e,n,i){var o,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,n,s):o(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s}function _t(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function vt(t,e){return t[0]-e[0]||t[1]-e[1]}function yt(t){for(var e,n,i,o=t.length,r=[0,1],s=2,a=2;a<o;++a){for(;s>1&&(e=t[r[s-2]],n=t[r[s-1]],i=t[a],(n[0]-e[0])*(i[1]-e[1])-(n[1]-e[1])*(i[0]-e[0])<=0);)--s;r[s++]=a}return r.slice(0,s)}var bt=function(){function t(t){return this.parent=t,this.node=null,this.autoGenerate=!1,this.child_index=null,this.domText=null,this.child_items=[],this.dom_attrs=[],this.dom_classes=[],this.tags=[],this.eventCode=null,void 0!==t.global&&(this.global=t.global),Object(this).dom_params&&(Object(this).dom_params.tag&&(this.domTag=Object(this).dom_params.tag),Object(this).dom_params.class&&(this.domClass=Object(this).dom_params.class),Object(this).dom_params.event_code&&(this.eventCode=Object(this).dom_params.event_code)),void 0!==Object(this).dom_params.autoGenerate&&!0===Object(this).dom_params.autoGenerate&&(this.autoGenerate=!0),this.generateThisDom(),this}return t.prototype.generateThisDom=function(){return this.autoGenerate&&(this.domGenerate(this.parent.node),this.afterGenerate()),this},t.prototype.domGenerate=function(t,e){void 0===e&&(e=0);var n=this.domTag?this.domTag:"g";this.child_index=e,this.node=t.datum(this.parent).append(n);for(var i=0;i<this.dom_attrs.length;i++){var o=this.dom_attrs[i];this.node.attr(o.name,o.value)}this.domText&&this.node.text(this.domText),this.domClass&&this.node.classed(this.domClass,!0);for(var r=0;r<this.dom_classes.length;r++){var s=this.dom_classes[r];this.node.classed(s.name,s.value)}return this},t.prototype.attr=function(t,e){return this.dom_attrs.push({name:t,value:e}),this},t.prototype.text=function(t){return this.domText=t,this},t.prototype.addChild=function(t,e,n){for(var i in e){var o=e[i];t.dom_attrs.push({name:i,value:o})}return this.child_items.push(t),this},t.prototype.classed=function(t,e){return void 0===e&&(e=!0),this.dom_classes.push({name:t,value:e}),this},t.prototype.clear=function(){return this.child_items.map((function(t){t.node.remove()})),this.child_items=[],this},t.prototype.updateChilds=function(){var t=this;return this.child_items.map((function(e,n){e.domGenerate(t.node,n),e.update()})),this.afterGenerate(),this.updateEvents(!1),this},t.prototype.updateEvents=function(t){void 0===t&&(t=!1);var e=this,n=["click","mousever","mouseleave","mouseout","mouseenter","mousemove","keydown","keypress","mousedown","mouseup","touchstart"];if(this.eventCode){for(var i=function(t){var i=o.global.eventManager.events[t],r=i.type.toString().split(".");r[0].toLowerCase()===o.eventCode.toLowerCase()&&-1!==n.indexOf(r[1].toLowerCase())&&void 0!==r[1]&&o.node.on(r[1].toLowerCase()+".globalevent",(function(t){var n=ft(e.parent.node.node());i.fn(e,t,n)}))},o=this,r=0;r<this.global.eventManager.events.length;r++)i(r);t&&this.child_items.length>0&&this.child_items.map((function(t){"function"==typeof t.updateEvents&&t.updateEvents(!0)}))}return this},t.prototype.addEventListener=function(t,e){return this.global.eventManager.addEventListener(t,e),this.updateEvents(!1),this},t.prototype.addTag=function(t){return this.tags.push(t),this},t.prototype.hasTag=function(t){return-1!==this.tags.indexOf(t)},t.prototype.getChilds=function(t){return void 0===t&&(t=null),null===t?this.child_items.filter((function(e){return e.constructor.name===t})):this.child_items},t.prototype.getChildCount=function(){return this.child_items.length},t.prototype.beforeGenerate=function(){},t.prototype.afterGenerate=function(){},t.prototype.addToParent=function(){return this.parent.addChild(this),this},t.prototype.addTo=function(t){return t.addChild(this),this},t}();function wt(t){return function(e){e.prototype.dom_params={},t.tag&&(e.prototype.dom_params.tag=t.tag),t.class&&(e.prototype.dom_params.class=t.class),t.event_code?e.prototype.dom_params.event_code=t.event_code:t.class&&(e.prototype.dom_params.event_code=t.class),void 0!==t.autoGenerate?e.prototype.dom_params.autoGenerate=t.autoGenerate:e.prototype.dom_params.autoGenerate=!0}}var Et,xt,kt,Mt=function(){this.child_index=null,this.item_type=null},Lt=function(t){function e(e){var n=t.call(this)||this;return n.tags=[],n.tag_index={},n.id=e.id,n.x=e.x,n.y=e.y,n.title=e.title||null,n.color=e.color||null,n.block=e.block,n.note=e.note||null,n.salable=!1!==e.salable||e.salable,n.selected=e.selected||!1,n.tags=e.tags||[],n.custom_data=e.custom_data||{},n.tag_index={},n.svg=null,n.icon=null,n}return gt(e,t),e.prototype.selectedToggle=function(){return this.selected=!0!==this.selected,this.selected},e.prototype.addTag=function(t){this.tag_index[t]||(this.tag_index[t]=!0,this.tags.push(t))},e.prototype.removeTags=function(t){},e.prototype.toJson=function(){return{id:this.id,x:this.x,y:this.y,salable:this.salable,note:this.note,color:this.color,block:this.block.toJson()}},e}(Mt),Tt=function(t){function e(e){var n=t.call(this)||this;return n.x=e.x,n.y=e.y,n.title=e.title,n.block=e.block,n}return gt(e,t),e}(Mt),zt=function(t){function e(e){var n=t.call(this)||this;return n.id=e.id?e.id:(1e3*Math.random()).toString(),n.width=e.width||null,n.height=e.height||null,n.x=e.x||null,n.y=e.y||null,n.bounds=e._bounds||[],n.color=e.color||"#f1f1f1",n.border_color=e.border_color||"#f1f1f1",n.title=e.title,n.rotate=e.rotate||0,n.labels=e.labels.map((function(t){return t.block=n,new Tt(t)}))||[],n.seats=e.seats.map((function(t){return t.block=n,new Lt(t)}))||[],n}return gt(e,t),e.prototype.toJson=function(){return{id:this.id,title:this.title,x:this.x,y:this.y,color:this.color,width:this.width,height:this.height}},e}(Mt),Ct=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n.attr("block-id",e.item.block.id),n.attr("r",n.global.config.style.seat.radius),n.attr("fill",n.global.config.style.seat.color),n.attr("stroke","rgba(0,0,0,0.3)"),n.attr("stroke-width",1),n}return gt(e,t),e.prototype.update=function(){return this},e=mt([wt({tag:"circle",class:"seat-circle",autoGenerate:!1}),_t("design:paramtypes",[Bt])],e)}(bt),Ot=function(){function t(t){this.x=t.x||0,this.y=t.y||0}return t.prototype.toArray=function(){return[this.x,this.y]},t.prototype.toJson=function(){return{}},t}();!function(t){t.ADD_BLOCK="BLOCK.ADD",t.REMOVE_BLOCK="BLOCK.REMOVE",t.CLICK_BLOCK="BLOCK.CLICK",t.MOUSEENTER_BLOCK="BLOCK.MOUSEENTER",t.TOUCHSTART_BLOCK="BLOCK.TOUCHSTART",t.MOUSEDOWN_BLOCK="BLOCK.MOUSEDOWN",t.MOUSEUP_BLOCK="BLOCK.MOUSEUP",t.MOUSEMOVE_BLOCK="BLOCK.MOUSEMOVE",t.MOUSELEAVE_BLOCK="BLOCK.MOUSELEAVE",t.UPDATE_BLOCK="BLOCK.UPDATE",t.CLICK_SEAT="SEAT.CLICK",t.TOUCHSTART_SEAT="SEAT.TOUCHSTART",t.MOUSEMOVE_SEAT="SEAT.MOUSEMOVE",t.MOUSEDOWN_SEAT="SEAT.MOUSEDOWN",t.MOUSEENTER_SEAT="SEAT.MOUSEENTER",t.MOUSELEAVE_SEAT="SEAT.MOUSELEAVE",t.MOUSEOUT_SEAT="SEAT.MOUSEOUT",t.ADD_SEAT="SEAT.ADD",t.REMOVE_SEAT="SEAT.REMOVE",t.ZOOM_LEVEL_CHANGE="ZOOM_LEVEL_CHANGE",t.BOUND_CLICK="BOUND.CLICK",t.MOUSE_MOVE="MOUSE.MOVE",t.RESIZE_WINDOW="WINDOW.RESIZE",t.CLICK_ZOOM_OUT="ZOOM-OUT-BG.CLICK",t.MOUSEMOVE_ZOOM_OUT="ZOOM-OUT-BG.MOUSEMOVE",t.KEYDOWN_SVG="KEYDOWN.SEATMAP-SVG",t.KEYUP_SVG="KEYUP.SEATMAP-SVG",t.MULTI_SELECT_ENABLE="MULTI_SELECT_ENABLE",t.MULTI_SELECT_DISABLE="MULTI_SELECT_DISABLE",t.BEST_AVAILABLE_ENABLE="BEST_AVAILABLE_ENABLE",t.MBEST_AVAILABLE_DISABLE="MBEST_AVAILABLE_DISABLE",t.READY="READY"}(Et||(Et={})),function(t){t.VENUE="VENUE",t.BLOCK="BLOCK",t.SEAT="SEAT"}(xt||(xt={})),function(t){t.HOVER="hover",t.FOCUS="focus",t.LEAVE="leave",t.SELECT="select",t.NORMAL="normal"}(kt||(kt={}));var St,At=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n.attr("d","M12.9,953.7l-6.3,6.5l-2.9-2.5l-2.1,2.4l4.1,3.5l1.1,1l1.1-1.1l7.3-7.6L12.9,953.7L12.9,953.7z"),n.attr("fill",n.global.config.style.seat.check_color),n.attr("transform","translate(-8,-959.36218)"),n.attr("pointer-events","none"),n.attr("display","none"),n}return gt(e,t),e.prototype.update=function(){return this},e.prototype.afterGenerate=function(){this.node.style("pointer-events","none")},e.prototype.show=function(){return this.node.attr("display","block"),this},e.prototype.hide=function(){return this.node.attr("display","none"),this},e=mt([wt({tag:"path",class:"seat-check",autoGenerate:!1}),_t("design:paramtypes",[Bt])],e)}(bt),Bt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.parent=e,i.item=n,i.coordinates=new Ot(n),i.attr("transform","translate("+i.coordinates.toArray()+")"),i.item.svg=i,i}return gt(e,t),e.prototype.setColor=function(t,e){return void 0===e&&(e=!1),e?this.circle.node.transition().duration(this.global.config.animation_speed).attr("fill",t):this.circle.node.attr("fill",t),this},e.prototype.updateColor=function(t){return this.setColor(this.getColor()),this},e.prototype.select=function(t){return this.item.selected=!0,this.node.classed("selected",!0),this.circle.node.attr("fill",this.global.config.style.seat.selected),this.check.show(),this},e.prototype.unSelect=function(){return this.item.selected=!1,this.node.classed("selected",!1),this.circle.node.attr("fill",this.global.config.style.seat.color),this.check.hide(),this},e.prototype.isSelected=function(){return this.item.selected},e.prototype.isSalable=function(){return this.item.salable},e.prototype.hover=function(){this.setColor(this.global.config.style.seat.hover)},e.prototype.blur=function(){this.setColor(this.getColor())},e.prototype.getColor=function(t){return void 0===t&&(t=null),this.isSalable()?t==kt.FOCUS?this.isSelected()?this.global.config.style.seat.focus_out:this.global.config.style.seat.focus:t==kt.HOVER?this.isSelected()?this.global.config.style.seat.selected:this.global.config.style.seat.hover:t==kt.LEAVE?this.isSelected()?this.global.config.style.seat.selected:this.global.config.style.seat.color:t==kt.SELECT?(this.isSelected(),this.global.config.style.seat.selected):this.isSelected()?this.global.config.style.seat.selected:this.global.config.style.seat.color:this.global.config.style.seat.not_salable},e.prototype.update=function(){return this.circle=new Ct(this),this.addChild(this.circle),this.check=new At(this).addTo(this),this.updateChilds(),this},e.prototype.afterGenerate=function(){this.setColor(this.getColor()),this.item.selected?this.check.show():this.check.hide()},e=mt([wt({tag:"g",class:"seat",autoGenerate:!1}),_t("design:paramtypes",[Nt,Lt])],e)}(bt),Nt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.parent=e,i.item=n,i.global.eventManager.addEventListener(Et.MOUSEENTER_SEAT,(function(t){i.global.multi_select||t.setColor(t.getColor(kt.HOVER))})),i.global.eventManager.addEventListener(Et.MOUSELEAVE_SEAT,(function(t){t.setColor(t.getColor())})),i}return gt(e,t),e.prototype.update=function(){var t=this;return this.item.seats.forEach((function(e){t.addChild(new Bt(t,e),{id:e.id})})),this.updateChilds(),this},e.prototype.getSeat=function(t){return this.child_items.find((function(e){return e.item.id==t}))},e.prototype.getSeats=function(){return this.child_items},e.prototype.getSeatsCount=function(){return this.child_items.length},e.prototype.getSeatByIndex=function(t){return this.child_items[t]},e.prototype.resetSeatsColors=function(t){void 0===t&&(t=!1);for(var e=0;e<this.getSeatsCount();e++){var n=this.getSeatByIndex(e);n.item;var i=n.getColor();!n.isSelected()&&n.isSalable()&&(i=n.getColor(kt.LEAVE),n.setColor(i,t))}},e=mt([wt({tag:"g",class:"seats",autoGenerate:!1}),_t("design:paramtypes",[Zt,zt])],e)}(bt),Ut=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n.attr("fill",n.global.config.style.block.title_color),n.attr("font-size",48),n}return gt(e,t),e.prototype.update=function(){return this},e=mt([wt({tag:"text",class:"title",autoGenerate:!1}),_t("design:paramtypes",[Vt])],e)}(bt),Vt=function(t){function e(e,n){var i=t.call(this,e)||this;i.parent=e,i.item=n,console.log("item",n),i.attr("opacity",0);var o=(i.item.bounds[1][0]-i.item.bounds[2][0])/2+i.item.bounds[2][0],r=(i.item.bounds[0][1]-i.item.bounds[1][1])/2+i.item.bounds[1][1];return i.attr("transform","translate("+[o,r]+")"),i}return gt(e,t),e.prototype.update=function(){return this.title=new Ut(this),this.addChild(this.title),this.updateChilds(),this.title.node.text(this.parent.item.title),this},e=mt([wt({tag:"g",class:"info",autoGenerate:!1}),_t("design:paramtypes",[Zt,zt])],e)}(bt),It=function(t){function e(e,n){var i=t.call(this,e)||this;return i.parent=e,i.item=n,i}return gt(e,t),e.prototype.show=function(){this.node.classed("bound-hide",!1)},e.prototype.hide=function(){this.node.classed("bound-hide",!0)},e.prototype.update=function(){return this.updateChilds(),this.node.datum(this.item.bounds).attr("d",(function(t){return"M"+t.join("L")+"Z"})),this},e=mt([wt({tag:"path",class:"bound",autoGenerate:!1}),_t("design:paramtypes",[Object,zt])],e)}(bt),Kt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.parent=e,i.item=n,i}return gt(e,t),e.prototype.update=function(){return this.bound1=new It(this,this.item),this.bound1.attr("fill",this.parent.item.border_color),this.bound1.attr("stroke-width",70),this.bound1.attr("stroke",this.parent.item.border_color),this.bound1.classed("block-hull-border"),this.bound2=new It(this,this.item),this.bound2.attr("fill",this.item.color),this.bound2.attr("stroke-width",60),this.bound2.attr("stroke",this.item.color),this.bound2.classed("block-hull"),this.addChild(this.bound1),this.addChild(this.bound2),this.updateChilds(),this},e=mt([wt({tag:"g",class:"bounds",autoGenerate:!1}),_t("design:paramtypes",[Zt,zt])],e)}(bt),Gt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.parent=e,i.item=n,i.global.eventManager.addEventListener(Et.BOUND_CLICK,(function(t){if(!i.global.multi_select){var n=t.parent.parent.item;t.hasTag("block-level")?e.global.zoomManager.zoomToBlock(n.id):t.hasTag("seat-level")&&e.global.zoomManager.zoomToSelection()}})),i}return gt(e,t),e.prototype.update=function(){return this.seatLevelMask=new It(this,this.item),this.seatLevelMask.attr("fill",this.item.color),this.seatLevelMask.attr("stroke-width",59),this.seatLevelMask.attr("stroke",this.item.color),this.seatLevelMask.tags.push("seat-level"),this.seatLevelMask.classed("seat-level-mask"),this.blockLevelMask=new It(this,this.item),this.blockLevelMask.attr("fill",this.item.color),this.blockLevelMask.attr("stroke-width",59),this.blockLevelMask.attr("stroke",this.item.color),this.blockLevelMask.tags.push("block-level"),this.blockLevelMask.classed("block-level-mask"),this.addChild(this.seatLevelMask),this.addChild(this.blockLevelMask),this.updateChilds(),this},e=mt([wt({tag:"g",class:"masks",autoGenerate:!1}),_t("design:paramtypes",[Zt,zt])],e)}(bt),Dt=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n.attr("r",n.global.config.style.label.radius),n.attr("fill",n.global.config.style.label.bg),n}return gt(e,t),e.prototype.update=function(){return this},e=mt([wt({tag:"circle",class:"label-circle",autoGenerate:!1}),_t("design:paramtypes",[Rt])],e)}(bt),Pt=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n.attr("fill",n.global.config.style.label.color),n.attr("font-size",n.global.config.style.label.font_size),n}return gt(e,t),e.prototype.update=function(){return this},e=mt([wt({tag:"text",class:"label-text",autoGenerate:!1}),_t("design:paramtypes",[Rt])],e)}(bt),Rt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.parent=e,i.item=n,i.coordinates=new Ot(n),i.attr("transform","translate("+i.coordinates.toArray()+")"),i}return gt(e,t),e.prototype.update=function(){return this.circle=new Dt(this),this.addChild(this.circle),this.circle=new Pt(this),this.addChild(this.circle),this.updateChilds(),this.circle.node.text(this.item.title),this},e=mt([wt({tag:"g",class:"label",autoGenerate:!1}),_t("design:paramtypes",[jt,Tt])],e)}(bt),jt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.parent=e,i.item=n,i}return gt(e,t),e.prototype.update=function(){var t=this;return this.item.labels.map((function(e){t.addChild(new Rt(t,e))})),this.updateChilds(),this},e.prototype.getLabels=function(){return this.child_items},e=mt([wt({tag:"g",class:"labels",autoGenerate:!1}),_t("design:paramtypes",[Zt,zt])],e)}(bt),Zt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.parent=e,i.item=n,i.center_position={x:null,y:null},i.top_position={x:null,y:null},i.attr("id",n.id),i.attr("opacity",0),i.global.eventManager.addEventListener(Et.ZOOM_LEVEL_CHANGE,(function(t){t.level===xt.VENUE?(i.mask.blockLevelMask.show(),i.mask.seatLevelMask.show(),i.seats.resetSeatsColors(!1),i.infosToCenter()):t.level===xt.BLOCK?(i.mask.blockLevelMask.hide(),i.mask.seatLevelMask.show(),i.infosToTop()):t.level===xt.SEAT&&(i.mask.blockLevelMask.hide(),i.mask.seatLevelMask.hide(),i.seats.resetSeatsColors(!1),i.infosToTop())})),i.global.eventManager.addEventListener(Et.MULTI_SELECT_ENABLE,(function(){i.seats.resetSeatsColors(!1)})),i.global.eventManager.addEventListener(Et.MULTI_SELECT_DISABLE,(function(){i.seats.resetSeatsColors(!1)})),i.global.eventManager.addEventListener(Et.MOUSEMOVE_BLOCK,(function(t){if(i.parent.parent.searchCircle.is_enable&&!i.global.multi_select){var e=ft(i.parent.parent.blocks.node.node()),n=i.global.config.zoom_focus_circle_radius;if(i.global.zoomManager.zoomLevel===xt.BLOCK)for(var o=0;o<t.seats.getSeatsCount();o++){var r=t.seats.getSeatByIndex(o),s=r.item,a=r.getColor();r.isSelected()?a=r.getColor(kt.SELECT):(s.x-n<e[0]&&s.x+n>e[0]&&s.y-n<e[1]&&s.y+n>e[1]&&(a=r.getColor(kt.FOCUS)),r.setColor(a))}}})),i.global.eventManager.addEventListener(Et.MOUSELEAVE_BLOCK,(function(t){console.log(t),i.seats.resetSeatsColors()})),i.parent.node.on("mouseleave.seats",(function(){i.seats.resetSeatsColors(!1)})),i}return gt(e,t),e.prototype.update=function(){return this.bounds=new Kt(this,this.item),this.addChild(this.bounds),this.seats=new Nt(this,this.item),this.addChild(this.seats),this.labels=new jt(this,this.item),this.addChild(this.labels),this.mask=new Gt(this,this.item),this.addChild(this.mask),this.info=new Vt(this,this.item),this.addChild(this.info),this.center_position.x=(this.item.bounds[1][0]-this.item.bounds[2][0])/2+this.item.bounds[2][0],this.center_position.y=(this.item.bounds[0][1]-this.item.bounds[1][1])/2+this.item.bounds[1][1],this.top_position.x=this.center_position.x,this.top_position.y=this.item.bounds[1][1]-60,this.updateChilds(),this.infosToCenter(),this.node.interrupt().transition().duration(this.global.config.animation_speed).attr("opacity",1),this.node.attr("transform-origin","".concat(this.center_position.x," ").concat(this.center_position.y)),this.item.rotate&&this.node.attr("transform","rotate("+this.item.rotate+")"),this},e.prototype.infosToTop=function(){this.info.node&&this.top_position.x&&(this.info.node.interrupt().transition().duration(this.global.config.animation_speed).attr("transform","translate("+this.top_position.x+","+this.top_position.y+")").attr("opacity",.8).attr("font-size",14),this.info.title.node.transition().duration(this.global.config.animation_speed).attr("fill",this.item.color))},e.prototype.infosToCenter=function(){this.info.node&&this.center_position.x&&(this.info.node.interrupt().transition().duration(this.global.config.animation_speed).attr("transform","translate("+this.center_position.x+","+this.center_position.y+")").attr("opacity",1).attr("font-size",32),this.info.title.node.transition().duration(this.global.config.animation_speed).attr("fill",this.global.config.style.block.title_color))},e=mt([wt({tag:"g",class:"block",autoGenerate:!1}),_t("design:paramtypes",[Ht,zt])],e)}(bt),Ht=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n}return gt(e,t),e.prototype.update=function(){var t=this;return this.clear(),this.global.data.getBlocks().map((function(e){var n=new Zt(t,e),i=e.seats;i&&i.length&&(i[0].y+=1e-4,i[0].x+=1e-4);var o=i.map((function(t){return[t.x,t.y]})).concat(e.labels.map((function(t){return[t.x,t.y]})));e.bounds=function(t){if((n=t.length)<3)return null;var e,n,i=new Array(n),o=new Array(n);for(e=0;e<n;++e)i[e]=[+t[e][0],+t[e][1],e];for(i.sort(vt),e=0;e<n;++e)o[e]=[i[e][0],-i[e][1]];var r=yt(i),s=yt(o),a=s[0]===r[0],l=s[s.length-1]===r[r.length-1],u=[];for(e=r.length-1;e>=0;--e)u.push(t[i[r[e]][2]]);for(e=+a;e<s.length-l;++e)u.push(t[i[s[e]][2]]);return u}(o),t.addChild(n)})),this.updateChilds(),this.seats=this.node.selectAll(".seat"),this},e.prototype.getBlock=function(t){var e=this.getBlocks().find((function(e){return e.item.id==t}));return e||null},e.prototype.getBlocks=function(){return this.getChilds(Zt.name)},e.prototype.center=function(){},e=mt([wt({tag:"g",class:"blocks",autoGenerate:!1}),_t("design:paramtypes",[Xt])],e)}(bt),Yt=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n.attr("r",n.parent.global.config.zoom_focus_circle_radius),n}return gt(e,t),e.prototype.update=function(){return this.updateChilds(),this},e=mt([wt({tag:"circle",class:"circle",autoGenerate:!1}),_t("design:paramtypes",[qt])],e)}(bt),qt=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n.is_enable=!0,n.global.eventManager.addEventListener(Et.MOUSE_MOVE,(function(t){n.global.zoomManager.zoomLevel===xt.BLOCK&&n.is_enable&&n.node.attr("transform","translate("+t+")")})),n.global.eventManager.addEventListener(Et.ZOOM_LEVEL_CHANGE,(function(t){t.level!==xt.VENUE&&t.level!==xt.SEAT||n.node.classed("show",!1)})),n.global.eventManager.addEventListener(Et.MULTI_SELECT_ENABLE,(function(){n.disable()})),n.global.eventManager.addEventListener(Et.MULTI_SELECT_DISABLE,(function(){n.enable()})),n}return gt(e,t),e.prototype.update=function(){var t=this;return this.clear(),this.circle=new Yt(this),this.addChild(this.circle),this.updateChilds(),this.parent.blocks.node.on("mouseleave.search",(function(){t.node.classed("show",!1)})),this.parent.blocks.node.on("mousemove.search",(function(){t.global.zoomManager.zoomLevel===xt.VENUE?t.node.classed("show",!1):t.global.zoomManager.zoomLevel===xt.BLOCK?t.node.classed("show",!0):t.global.zoomManager.zoomLevel===xt.SEAT&&t.node.classed("show",!1)})),this},e.prototype.enable=function(){return this.is_enable=!0,this.node.style("display","block"),this},e.prototype.disable=function(){return this.is_enable=!1,this.node.style("display","none"),this},e=mt([wt({tag:"g",class:"search-circle",autoGenerate:!1}),_t("design:paramtypes",[Xt])],e)}(bt),Xt=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n}return gt(e,t),e.prototype.update=function(){this.blocks=new Ht(this),this.addChild(this.blocks),this.searchCircle=new qt(this),this.addChild(this.searchCircle),this.updateChilds()},e=mt([wt({tag:"g",class:"stage",autoGenerate:!1}),_t("design:paramtypes",[me])],e)}(bt),Wt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(t){!function(e){var n="object"==typeof Wt?Wt:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),i=o(t);function o(t,e){return function(n,i){"function"!=typeof t[n]&&Object.defineProperty(t,n,{configurable:!0,writable:!0,value:i}),e&&e(n,i)}}void 0===n.Reflect?n.Reflect=t:i=o(n.Reflect,i),function(t){var e=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,i=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",r="function"==typeof Object.create,s={__proto__:[]}instanceof Array,a=!r&&!s,l={create:r?function(){return it(Object.create(null))}:s?function(){return it({__proto__:null})}:function(){return it({})},has:a?function(t,n){return e.call(t,n)}:function(t,e){return e in t},get:a?function(t,n){return e.call(t,n)?t[n]:void 0}:function(t,e){return t[e]}},u=Object.getPrototypeOf(Function),c="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,h=c||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?tt():Map,f=c||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?et():Set,d=new(c||"function"!=typeof WeakMap?nt():WeakMap);function p(t,e,n,i){if(U(n)){if(!Z(t))throw new TypeError;if(!Y(e))throw new TypeError;return k(t,e)}if(!Z(t))throw new TypeError;if(!K(e))throw new TypeError;if(!K(i)&&!U(i)&&!V(i))throw new TypeError;return V(i)&&(i=void 0),M(t,e,n=j(n),i)}function g(t,e){function n(n,i){if(!K(n))throw new TypeError;if(!U(i)&&!q(i))throw new TypeError;S(t,e,n,i)}return n}function m(t,e,n,i){if(!K(n))throw new TypeError;return U(i)||(i=j(i)),S(t,e,n,i)}function _(t,e,n){if(!K(e))throw new TypeError;return U(n)||(n=j(n)),T(t,e,n)}function v(t,e,n){if(!K(e))throw new TypeError;return U(n)||(n=j(n)),z(t,e,n)}function y(t,e,n){if(!K(e))throw new TypeError;return U(n)||(n=j(n)),C(t,e,n)}function b(t,e,n){if(!K(e))throw new TypeError;return U(n)||(n=j(n)),O(t,e,n)}function w(t,e){if(!K(t))throw new TypeError;return U(e)||(e=j(e)),A(t,e)}function E(t,e){if(!K(t))throw new TypeError;return U(e)||(e=j(e)),B(t,e)}function x(t,e,n){if(!K(e))throw new TypeError;U(n)||(n=j(n));var i=L(e,n,!1);if(U(i))return!1;if(!i.delete(t))return!1;if(i.size>0)return!0;var o=d.get(e);return o.delete(n),o.size>0||d.delete(e),!0}function k(t,e){for(var n=t.length-1;n>=0;--n){var i=(0,t[n])(e);if(!U(i)&&!V(i)){if(!Y(i))throw new TypeError;e=i}}return e}function M(t,e,n,i){for(var o=t.length-1;o>=0;--o){var r=(0,t[o])(e,n,i);if(!U(r)&&!V(r)){if(!K(r))throw new TypeError;i=r}}return i}function L(t,e,n){var i=d.get(t);if(U(i)){if(!n)return;i=new h,d.set(t,i)}var o=i.get(e);if(U(o)){if(!n)return;o=new h,i.set(e,o)}return o}function T(t,e,n){if(z(t,e,n))return!0;var i=Q(e);return!V(i)&&T(t,i,n)}function z(t,e,n){var i=L(e,n,!1);return!U(i)&&P(i.has(t))}function C(t,e,n){if(z(t,e,n))return O(t,e,n);var i=Q(e);return V(i)?void 0:C(t,i,n)}function O(t,e,n){var i=L(e,n,!1);if(!U(i))return i.get(t)}function S(t,e,n,i){L(n,i,!0).set(t,e)}function A(t,e){var n=B(t,e),i=Q(t);if(null===i)return n;var o=A(i,e);if(o.length<=0)return n;if(n.length<=0)return o;for(var r=new f,s=[],a=0,l=n;a<l.length;a++){var u=l[a];r.has(u)||(r.add(u),s.push(u))}for(var c=0,h=o;c<h.length;c++){u=h[c];r.has(u)||(r.add(u),s.push(u))}return s}function B(t,e){var n=[],i=L(t,e,!1);if(U(i))return n;for(var o=W(i.keys()),r=0;;){var s=$(o);if(!s)return n.length=r,n;var a=F(s);try{n[r]=a}catch(t){try{J(o)}finally{throw t}}r++}}function N(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function U(t){return void 0===t}function V(t){return null===t}function I(t){return"symbol"==typeof t}function K(t){return"object"==typeof t?null!==t:"function"==typeof t}function G(t,e){switch(N(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var n=3===e?"string":5===e?"number":"default",o=X(t,i);if(void 0!==o){var r=o.call(t,n);if(K(r))throw new TypeError;return r}return D(t,"default"===n?"number":n)}function D(t,e){if("string"===e){var n=t.toString;if(H(n))if(!K(o=n.call(t)))return o;if(H(i=t.valueOf))if(!K(o=i.call(t)))return o}else{var i;if(H(i=t.valueOf))if(!K(o=i.call(t)))return o;var o,r=t.toString;if(H(r))if(!K(o=r.call(t)))return o}throw new TypeError}function P(t){return!!t}function R(t){return""+t}function j(t){var e=G(t,3);return I(e)?e:R(e)}function Z(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function H(t){return"function"==typeof t}function Y(t){return"function"==typeof t}function q(t){switch(N(t)){case 3:case 4:return!0;default:return!1}}function X(t,e){var n=t[e];if(null!=n){if(!H(n))throw new TypeError;return n}}function W(t){var e=X(t,o);if(!H(e))throw new TypeError;var n=e.call(t);if(!K(n))throw new TypeError;return n}function F(t){return t.value}function $(t){var e=t.next();return!e.done&&e}function J(t){var e=t.return;e&&e.call(t)}function Q(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===u)return e;if(e!==u)return e;var n=t.prototype,i=n&&Object.getPrototypeOf(n);if(null==i||i===Object.prototype)return e;var o=i.constructor;return"function"!=typeof o||o===t?e:o}function tt(){var t={},e=[],n=function(){function t(t,e,n){this._index=0,this._keys=t,this._values=e,this._selector=n}return t.prototype["@@iterator"]=function(){return this},t.prototype[o]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var n=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var n=this._find(t,!0);return this._values[n]=e,this},e.prototype.delete=function(e){var n=this._find(e,!1);if(n>=0){for(var i=this._keys.length,o=n+1;o<i;o++)this._keys[o-1]=this._keys[o],this._values[o-1]=this._values[o];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new n(this._keys,this._values,i)},e.prototype.values=function(){return new n(this._keys,this._values,r)},e.prototype.entries=function(){return new n(this._keys,this._values,s)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[o]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function i(t,e){return t}function r(t,e){return e}function s(t,e){return[t,e]}}function et(){return function(){function t(){this._map=new h}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[o]=function(){return this.keys()},t}()}function nt(){var t=16,n=l.create(),i=o();return function(){function t(){this._key=o()}return t.prototype.has=function(t){var e=r(t,!1);return void 0!==e&&l.has(e,this._key)},t.prototype.get=function(t){var e=r(t,!1);return void 0!==e?l.get(e,this._key):void 0},t.prototype.set=function(t,e){return r(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=r(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=o()},t}();function o(){var t;do{t="@@WeakMap@@"+u()}while(l.has(n,t));return n[t]=!0,t}function r(t,n){if(!e.call(t,i)){if(!n)return;Object.defineProperty(t,i,{value:l.create()})}return t[i]}function s(t,e){for(var n=0;n<e;++n)t[n]=255*Math.random()|0;return t}function a(t){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):s(new Uint8Array(t),t):s(new Array(t),t)}function u(){var e=a(t);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var n="",i=0;i<t;++i){var o=e[i];4!==i&&6!==i&&8!==i||(n+="-"),o<16&&(n+="0"),n+=o.toString(16).toLowerCase()}return n}}function it(t){return t.__=void 0,delete t.__,t}t("decorate",p),t("metadata",g),t("defineMetadata",m),t("hasMetadata",_),t("hasOwnMetadata",v),t("getMetadata",y),t("getOwnMetadata",b),t("getMetadataKeys",w),t("getOwnMetadataKeys",E),t("deleteMetadata",x)}(i)}()}(St||(St={}));var Ft=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n.global.eventManager.addEventListener(Et.RESIZE_WINDOW,(function(t){n.node.attr("width",t.width).attr("height",t.height).on("click.zoomout",(function(){n.global.eventManager.dispatch(Et.CLICK_ZOOM_OUT,n)}))})),n}return gt(e,t),e.prototype.update=function(){},e=mt([wt({tag:"rect",class:"zoom-out-bg",autoGenerate:!1}),_t("design:paramtypes",[me])],e)}(bt),$t=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n.attr("r",n.global.config.style.legend.radius),n.attr("fill",n.parent.legend_data.color),n}return gt(e,t),e.prototype.update=function(){},e=mt([wt({tag:"circle",class:"legend-circle",autoGenerate:!1}),_t("design:paramtypes",[te])],e)}(bt),Jt=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n.attr("x",1.5*n.global.config.style.legend.radius),n.attr("fill",n.global.config.style.legend.font_color),n.attr("font-size",n.global.config.style.legend.font_size),n}return gt(e,t),e.prototype.update=function(){},e=mt([wt({tag:"text",class:"legend-title",autoGenerate:!1}),_t("design:paramtypes",[te])],e)}(bt),Qt=function(t){function e(e){var n=t.call(this)||this;return n.x=e.x,n.y=e.y,n.title=e.title,n.color=e.color,n}return gt(e,t),e}(Mt),te=function(t){function e(e,n){var i=t.call(this,e)||this;return i.parent=e,i.legend_data=n,i}return gt(e,t),e.prototype.update=function(){if(this.circle=new $t(this),this.addChild(this.circle),this.title=new Jt(this),this.addChild(this.title),this.updateChilds(),this.title.node.text(this.legend_data.title),this.child_index){var t=this.child_index*this.global.config.style.legend.padding;this.node.attr("transform","translate("+[0,t]+")")}},e=mt([wt({tag:"g",class:"legend-item",autoGenerate:!1}),_t("design:paramtypes",[ee,Qt])],e)}(bt),ee=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n}return gt(e,t),e.prototype.update=function(){var t=[];t.push({title:this.global.config.lang.non_selectable,color:this.global.config.style.seat.not_salable}),t.push({title:this.global.config.lang.selectable,color:this.global.config.style.seat.color}),t.push({title:this.global.config.lang.your_selection,color:this.global.config.style.seat.selected});for(var e=0;e<t.length;e++){var n=new te(this,t[e]);this.addChild(n)}this.updateChilds()},e.prototype.afterGenerate=function(){var t=2*this.global.config.style.legend.radius,e=150-this.global.config.style.legend.padding*this.getChildCount();this.node.attr("transform","translate("+[t,e]+")")},e=mt([wt({tag:"g",class:"legend",autoGenerate:!1}),_t("design:paramtypes",[me])],e)}(bt),ne=Math.PI,ie=2*ne,oe=1e-6,re=ie-oe;function se(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ae(){return new se}function le(t){return function(){return t}}function ue(t){this._context=t}function ce(t){return new ue(t)}function he(t){return t[0]}function fe(t){return t[1]}se.prototype=ae.prototype={constructor:se,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,o,r){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+o)+","+(this._y1=+r)},arcTo:function(t,e,n,i,o){t=+t,e=+e,n=+n,i=+i,o=+o;var r=this._x1,s=this._y1,a=n-t,l=i-e,u=r-t,c=s-e,h=u*u+c*c;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>oe)if(Math.abs(c*a-l*u)>oe&&o){var f=n-r,d=i-s,p=a*a+l*l,g=f*f+d*d,m=Math.sqrt(p),_=Math.sqrt(h),v=o*Math.tan((ne-Math.acos((p+h-g)/(2*m*_)))/2),y=v/_,b=v/m;Math.abs(y-1)>oe&&(this._+="L"+(t+y*u)+","+(e+y*c)),this._+="A"+o+","+o+",0,0,"+ +(c*f>u*d)+","+(this._x1=t+b*a)+","+(this._y1=e+b*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,i,o,r){t=+t,e=+e,r=!!r;var s=(n=+n)*Math.cos(i),a=n*Math.sin(i),l=t+s,u=e+a,c=1^r,h=r?i-o:o-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>oe||Math.abs(this._y1-u)>oe)&&(this._+="L"+l+","+u),n&&(h<0&&(h=h%ie+ie),h>re?this._+="A"+n+","+n+",0,1,"+c+","+(t-s)+","+(e-a)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):h>oe&&(this._+="A"+n+","+n+",0,"+ +(h>=ne)+","+c+","+(this._x1=t+n*Math.cos(o))+","+(this._y1=e+n*Math.sin(o))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}},ue.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var de=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n.attr("width",n.global.config.style.tooltip.width),n.attr("height",n.global.config.style.tooltip.height),n.attr("x",0),n.attr("y",0),n.attr("rx",3),n.attr("ry",3),function(){var t=he,e=fe,n=le(!0),i=null,o=ce,r=null;function s(s){var a,l,u,c=s.length,h=!1;for(null==i&&(r=o(u=ae())),a=0;a<=c;++a)!(a<c&&n(l=s[a],a,s))===h&&((h=!h)?r.lineStart():r.lineEnd()),h&&r.point(+t(l,a,s),+e(l,a,s));if(u)return r=null,u+""||null}return s.x=function(e){return arguments.length?(t="function"==typeof e?e:le(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:le(+t),s):e},s.defined=function(t){return arguments.length?(n="function"==typeof t?t:le(!!t),s):n},s.curve=function(t){return arguments.length?(o=t,null!=i&&(r=o(i)),s):o},s.context=function(t){return arguments.length?(null==t?i=r=null:r=o(i=t),s):i},s}().x((function(t){return t.x})).y((function(t){return t.y})),n.attr("fill",n.global.config.style.tooltip.bg),n.attr("stroke","rgba(0,0,0,0.3)"),n.attr("stroke-width","1px"),n.attr("opacity",.8),n}return gt(e,t),e.prototype.update=function(){return this.updateChilds(),this},e.prototype.afterGenerate=function(){this.node.style("pointer-events","none")},e=mt([wt({tag:"rect",class:"tooltip-rect",autoGenerate:!1}),_t("design:paramtypes",[ge])],e)}(bt),pe=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n.attr("x",6),n.attr("y",21),n.attr("fill",n.global.config.style.tooltip.color),n}return gt(e,t),e.prototype.update=function(){return this.updateChilds(),this},e.prototype.afterGenerate=function(){this.node.style("pointer-events","none"),this.node.style("font-size","12px")},e.prototype.generateTitle=function(){this.node.selectAll("tspan").remove().data(this.title).enter().append("tspan").text((function(t){return t})).attr("x",6).attr("y",(function(t,e){return 16*e+16}))},e=mt([wt({tag:"text",class:"tooltip-title",autoGenerate:!1}),_t("design:paramtypes",[ge])],e)}(bt),ge=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n.attr("transform","translate(0,0)"),n.attr("opacity",0),n.activeSeat=null,n.global.eventManager.addEventListener([Et.MOUSEMOVE_SEAT],(function(t){n.global.multi_select||n.activeSeat!==t&&t.item.title&&(n.activeSeat=t,n.setTitle(t.item.title.split("\n")),n.title.generateTitle())})),n.global.eventManager.addEventListener([Et.MOUSEOUT_SEAT],(function(t){n.node.attr("opacity",0),n.activeSeat=null,n.title.title=[],n.title.generateTitle()})),n.global.eventManager.addEventListener([Et.TOUCHSTART_BLOCK],(function(t){n.node.attr("opacity",0)})),n}return gt(e,t),e.prototype.setTitle=function(t){return this.title.title=t,this},e.prototype.update=function(){return this.rect=new de(this).addTo(this),this.title=new pe(this).addTo(this),this.updateChilds(),this},e.prototype.afterGenerate=function(){var t=this;this.parent.node.on("mousemove.seat",(function(){if(!t.global.multi_select)if(t.global.zoomManager.zoomLevel===xt.SEAT&&null!==t.activeSeat){var e=ft(this),n=e[0]-t.global.config.style.tooltip.width/2,i=e[1]-(t.global.config.style.tooltip.height+t.global.config.style.seat.radius+2);t.node.attr("transform","translate("+[n,i]+")").attr("opacity",1)}else t.node.attr("opacity",0)}))},e=mt([wt({tag:"g",class:"seatmap-tooltip",autoGenerate:!1}),_t("design:paramtypes",[me])],e)}(bt),me=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=e,n.global.eventManager.addEventListener(Et.ZOOM_LEVEL_CHANGE,(function(t){n.node.classed("zoom-level-"+xt.SEAT,!1),n.node.classed("zoom-level-"+xt.BLOCK,!1),n.node.classed("zoom-level-"+xt.VENUE,!1),n.node.classed("zoom-level-"+t.level,!0)})),n}return gt(e,t),e.prototype.update=function(){var t=this;this.stage=new Xt(this).addToParent(),this.zoomOutBg=new Ft(this).addToParent(),this.global.config.legend&&(this.legend=new ee(this).addToParent()),this.tooltip=new ge(this).addToParent(),this.updateChilds(),this.stage.node.raise(),this.global.config.legend&&this.legend.node.raise(),this.tooltip.node.raise(),this.node.on("mousemove",(function(){var e=ft(t.stage.node.node());t.parent.eventManager.dispatch(Et.MOUSE_MOVE,e)}))},e=mt([wt({tag:"svg",class:"seatmap-svg",autoGenerate:!1}),_t("design:paramtypes",[to])],e)}(bt),_e=function(){function t(t){this.context=t}return t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.log(t),this},t}(),ve=function(){function t(t){this._self=t,this.blocks=[],this.eventManager=t.eventManager,this.addEventListener=t.eventManager.addEventListener}return t.prototype.addBlock=function(t){return this.blocks.push(new zt(t)),this.eventManager.dispatch(Et.ADD_BLOCK,[t]),this.eventManager.dispatch(Et.UPDATE_BLOCK,this.blocks),this},t.prototype.addBulkBlock=function(t){var e=this;return t.map((function(t){e.blocks.push(new zt(t))})),this.eventManager.dispatch(Et.ADD_BLOCK,[t]),this.eventManager.dispatch(Et.UPDATE_BLOCK,this.blocks),this},t.prototype.replaceData=function(t){return this.blocks=[],this.addBulkBlock(t),this},t.prototype.getBlock=function(t){var e=this.blocks.find((function(e){return e.id===t}));return e||null},t.prototype.getBlocks=function(t){if(t){var e=this.getBlock(t);return e?[e]:[]}return this.blocks},t.prototype.removeBlock=function(t){var e=this;return this.filterBlock({id:t}).map((function(t,n){e.blocks.splice(n,1)})),this.eventManager.dispatch(Et.REMOVE_BLOCK,t),this.eventManager.dispatch(Et.UPDATE_BLOCK,this.blocks),this},t.prototype.getSeat=function(t,e){var n=this.getBlock(e);if(n){var i=n.seats.find((function(e){return e.id==t}));return i||null}return console.error(new Error("Block not found!")),null},t.prototype.getSelectedSeats=function(t){var e=this.getBlocks(t),n=[];return e.forEach((function(t){t.seats.forEach((function(t){t.selected&&n.push(t)}))})),n},t.prototype.filterBlock=function(t){return this.blocks.filter((function(e){return e.id===t.id}))},t.prototype.toJson=function(){return{blocks:this.blocks}},t}(),ye=function(){this.radius=12,this.color="#77b2ff",this.not_salable="#6293d2",this.selected="#4770ff",this.hover="#4770ff",this.focus="#6293d2",this.focus_out="#ff001c",this.check_color="#ffffff",this.check_icon="",this.check_icon_color="#ffffff"},be=function(){this.fill="#ffffff",this.stroke="#ffffff",this.border_width=4,this.title_color="#000000",this.title_font_size=28},we=function(){this.radius=12,this.padding=36,this.font_size=12,this.font_color="#000"},Ee=function(){this.color="#000000",this.bg="#fff",this.font_size=12,this.radius=12},xe=function(){this.border_width=1,this.width=140,this.height=58,this.color="#000000",this.bg="#ffffff"},ke=function(){},Me=function(){function t(t){this.min_zoom=.1,this.max_zoom=1.9,this.animation_speed=600,this.resizable=!1,this.container=null,this.zoom_focus_circle_radius=60,this.click_enable_sold_seats=!1,this.legend=!1,this.canvas_stageout_control=!0,this.zoom_focus_circle_radius=t.zoom_focus_circle_radius?t.zoom_focus_circle_radius:this.zoom_focus_circle_radius,this.click_enable_sold_seats=t.click_enable_sold_seats?t.click_enable_sold_seats:this.click_enable_sold_seats,this.max_zoom=t.max_zoom?t.max_zoom:this.max_zoom,this.resizable=t.resizable?t.resizable:this.resizable,this.zoom_out_button=t.zoom_out_button?t.zoom_out_button:".zoom-out-button",this.legend=0!=t.legend||t.legend,this.canvas_stageout_control=0!=t.canvas_stageout_control||t.canvas_stageout_control,this.style=new ke,this.style.seat=Object.assign(new ye,t.style.seat),this.style.block=Object.assign(new be,t.style.block),this.style.legend=Object.assign(new we,t.style.legend),this.style.label=Object.assign(new Ee,t.style.label),this.style.tooltip=Object.assign(new xe,t.style.tooltip),t.style,this.lang={selectable:t.lang&&t.lang.selectable||"Selectable",non_selectable:t.lang&&t.lang.non_selectable||"Non Selectable or Rezerved",your_selection:t.lang&&t.lang.your_selection||"Your Selection"}}return t.prototype.getAll=function(){return this},t}(),Le={value:function(){}};function Te(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new ze(i)}function ze(t){this._=t}function Ce(t,e){for(var n,i=0,o=t.length;i<o;++i)if((n=t[i]).name===e)return n.value}function Oe(t,e,n){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=Le,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}function Se(){J.preventDefault(),J.stopImmediatePropagation()}function Ae(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Be(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Ne(){}ze.prototype=Te.prototype={constructor:ze,on:function(t,e){var n,i,o=this._,r=(i=o,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),s=-1,a=r.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s<a;)if(n=(t=r[s]).type)o[n]=Oe(o[n],t.name,e);else if(null==e)for(n in o)o[n]=Oe(o[n],t.name,null);return this}for(;++s<a;)if((n=(t=r[s]).type)&&(n=Ce(o[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ze(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,o=new Array(n),r=0;r<n;++r)o[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(r=0,n=(i=this._[t]).length;r<n;++r)i[r].value.apply(e,o)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],o=0,r=i.length;o<r;++o)i[o].value.apply(e,n)}};var Ue=.7,Ve=1/Ue,Ie="\\s*([+-]?\\d+)\\s*",Ke="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ge="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",De=/^#([0-9a-f]{3,8})$/,Pe=new RegExp("^rgb\\("+[Ie,Ie,Ie]+"\\)$"),Re=new RegExp("^rgb\\("+[Ge,Ge,Ge]+"\\)$"),je=new RegExp("^rgba\\("+[Ie,Ie,Ie,Ke]+"\\)$"),Ze=new RegExp("^rgba\\("+[Ge,Ge,Ge,Ke]+"\\)$"),He=new RegExp("^hsl\\("+[Ke,Ge,Ge]+"\\)$"),Ye=new RegExp("^hsla\\("+[Ke,Ge,Ge,Ke]+"\\)$"),qe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Xe(){return this.rgb().formatHex()}function We(){return this.rgb().formatRgb()}function Fe(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=De.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?$e(e):3===n?new tn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Je(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Je(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Pe.exec(t))?new tn(e[1],e[2],e[3],1):(e=Re.exec(t))?new tn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=je.exec(t))?Je(e[1],e[2],e[3],e[4]):(e=Ze.exec(t))?Je(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=He.exec(t))?rn(e[1],e[2]/100,e[3]/100,1):(e=Ye.exec(t))?rn(e[1],e[2]/100,e[3]/100,e[4]):qe.hasOwnProperty(t)?$e(qe[t]):"transparent"===t?new tn(NaN,NaN,NaN,0):null}function $e(t){return new tn(t>>16&255,t>>8&255,255&t,1)}function Je(t,e,n,i){return i<=0&&(t=e=n=NaN),new tn(t,e,n,i)}function Qe(t,e,n,i){return 1===arguments.length?((o=t)instanceof Ne||(o=Fe(o)),o?new tn((o=o.rgb()).r,o.g,o.b,o.opacity):new tn):new tn(t,e,n,null==i?1:i);var o}function tn(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function en(){return"#"+on(this.r)+on(this.g)+on(this.b)}function nn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function on(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function rn(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new an(t,e,n,i)}function sn(t){if(t instanceof an)return new an(t.h,t.s,t.l,t.opacity);if(t instanceof Ne||(t=Fe(t)),!t)return new an;if(t instanceof an)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,o=Math.min(e,n,i),r=Math.max(e,n,i),s=NaN,a=r-o,l=(r+o)/2;return a?(s=e===r?(n-i)/a+6*(n<i):n===r?(i-e)/a+2:(e-n)/a+4,a/=l<.5?r+o:2-r-o,s*=60):a=l>0&&l<1?0:s,new an(s,a,l,t.opacity)}function an(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function ln(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function un(t){return function(){return t}}function cn(t){return 1==(t=+t)?hn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):un(isNaN(e)?n:e)}}function hn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):un(isNaN(t)?e:t)}Ae(Ne,Fe,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Xe,formatHex:Xe,formatHsl:function(){return sn(this).formatHsl()},formatRgb:We,toString:We}),Ae(tn,Qe,Be(Ne,{brighter:function(t){return t=null==t?Ve:Math.pow(Ve,t),new tn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Ue:Math.pow(Ue,t),new tn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:en,formatHex:en,formatRgb:nn,toString:nn})),Ae(an,(function(t,e,n,i){return 1===arguments.length?sn(t):new an(t,e,n,null==i?1:i)}),Be(Ne,{brighter:function(t){return t=null==t?Ve:Math.pow(Ve,t),new an(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Ue:Math.pow(Ue,t),new an(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,o=2*n-i;return new tn(ln(t>=240?t-240:t+120,o,i),ln(t,o,i),ln(t<120?t+240:t-120,o,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var fn=function t(e){var n=cn(e);function i(t,e){var i=n((t=Qe(t)).r,(e=Qe(e)).r),o=n(t.g,e.g),r=n(t.b,e.b),s=hn(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=o(e),t.b=r(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function dn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var pn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gn=new RegExp(pn.source,"g");function mn(t,e){var n,i,o,r=pn.lastIndex=gn.lastIndex=0,s=-1,a=[],l=[];for(t+="",e+="";(n=pn.exec(t))&&(i=gn.exec(e));)(o=i.index)>r&&(o=e.slice(r,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:dn(n,i)})),r=gn.lastIndex;return r<e.length&&(o=e.slice(r),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,i=0;i<e;++i)a[(n=l[i]).i]=n.x(t);return a.join("")})}var _n,vn,yn,bn,wn=180/Math.PI,En={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function xn(t,e,n,i,o,r){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:o,translateY:r,rotate:Math.atan2(e,t)*wn,skewX:Math.atan(l)*wn,scaleX:s,scaleY:a}}function kn(t,e,n,i){function o(t){return t.length?t.pop()+" ":""}return function(r,s){var a=[],l=[];return r=t(r),s=t(s),function(t,i,o,r,s,a){if(t!==o||i!==r){var l=s.push("translate(",null,e,null,n);a.push({i:l-4,x:dn(t,o)},{i:l-2,x:dn(i,r)})}else(o||r)&&s.push("translate("+o+e+r+n)}(r.translateX,r.translateY,s.translateX,s.translateY,a,l),function(t,e,n,r){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),r.push({i:n.push(o(n)+"rotate(",null,i)-2,x:dn(t,e)})):e&&n.push(o(n)+"rotate("+e+i)}(r.rotate,s.rotate,a,l),function(t,e,n,r){t!==e?r.push({i:n.push(o(n)+"skewX(",null,i)-2,x:dn(t,e)}):e&&n.push(o(n)+"skewX("+e+i)}(r.skewX,s.skewX,a,l),function(t,e,n,i,r,s){if(t!==n||e!==i){var a=r.push(o(r)+"scale(",null,",",null,")");s.push({i:a-4,x:dn(t,n)},{i:a-2,x:dn(e,i)})}else 1===n&&1===i||r.push(o(r)+"scale("+n+","+i+")")}(r.scaleX,r.scaleY,s.scaleX,s.scaleY,a,l),r=s=null,function(t){for(var e,n=-1,i=l.length;++n<i;)a[(e=l[n]).i]=e.x(t);return a.join("")}}}var Mn=kn((function(t){return"none"===t?En:(_n||(_n=document.createElement("DIV"),vn=document.documentElement,yn=document.defaultView),_n.style.transform=t,t=yn.getComputedStyle(vn.appendChild(_n),null).getPropertyValue("transform"),vn.removeChild(_n),xn(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Ln=kn((function(t){return null==t?En:(bn||(bn=document.createElementNS("http://www.w3.org/2000/svg","g")),bn.setAttribute("transform",t),(t=bn.transform.baseVal.consolidate())?xn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):En)}),", ",")",")"),Tn=Math.SQRT2,zn=2,Cn=4,On=1e-12;function Sn(t){return((t=Math.exp(t))+1/t)/2}function An(t,e){var n,i,o=t[0],r=t[1],s=t[2],a=e[0],l=e[1],u=e[2],c=a-o,h=l-r,f=c*c+h*h;if(f<On)i=Math.log(u/s)/Tn,n=function(t){return[o+t*c,r+t*h,s*Math.exp(Tn*t*i)]};else{var d=Math.sqrt(f),p=(u*u-s*s+Cn*f)/(2*s*zn*d),g=(u*u-s*s-Cn*f)/(2*u*zn*d),m=Math.log(Math.sqrt(p*p+1)-p),_=Math.log(Math.sqrt(g*g+1)-g);i=(_-m)/Tn,n=function(t){var e=t*i,n=Sn(m),a=s/(zn*d)*(n*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(Tn*e+m)-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[o+a*c,r+a*h,s*n/Sn(Tn*e+m)]}}return n.duration=1e3*i,n}var Bn,Nn,Un=0,Vn=0,In=0,Kn=1e3,Gn=0,Dn=0,Pn=0,Rn="object"==typeof performance&&performance.now?performance:Date,jn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zn(){return Dn||(jn(Hn),Dn=Rn.now()+Pn)}function Hn(){Dn=0}function Yn(){this._call=this._time=this._next=null}function qn(t,e,n){var i=new Yn;return i.restart(t,e,n),i}function Xn(){Dn=(Gn=Rn.now())+Pn,Un=Vn=0;try{!function(){Zn(),++Un;for(var t,e=Bn;e;)(t=Dn-e._time)>=0&&e._call.call(null,t),e=e._next;--Un}()}finally{Un=0,function(){var t,e,n=Bn,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Bn=e);Nn=t,Fn(i)}(),Dn=0}}function Wn(){var t=Rn.now(),e=t-Gn;e>Kn&&(Pn-=e,Gn=t)}function Fn(t){Un||(Vn&&(Vn=clearTimeout(Vn)),t-Dn>24?(t<1/0&&(Vn=setTimeout(Xn,t-Rn.now()-Pn)),In&&(In=clearInterval(In))):(In||(Gn=Rn.now(),In=setInterval(Wn,Kn)),Un=1,jn(Xn)))}function $n(t,e,n){var i=new Yn;return e=null==e?0:+e,i.restart((function(n){i.stop(),t(n+e)}),e,n),i}Yn.prototype=qn.prototype={constructor:Yn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Zn():+n)+(null==e?0:+e),this._next||Nn===this||(Nn?Nn._next=this:Bn=this,Nn=this),this._call=t,this._time=n,Fn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fn())}};var Jn=Te("start","end","cancel","interrupt"),Qn=[],ti=0,ei=1,ni=2,ii=3,oi=4,ri=5,si=6;function ai(t,e,n,i,o,r){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};!function(t,e,n){var i,o=t.__transition;function r(t){n.state=ei,n.timer.restart(s,n.delay,n.time),n.delay<=t&&s(t-n.delay)}function s(r){var u,c,h,f;if(n.state!==ei)return l();for(u in o)if((f=o[u]).name===n.name){if(f.state===ii)return $n(s);f.state===oi?(f.state=si,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete o[u]):+u<e&&(f.state=si,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete o[u])}if($n((function(){n.state===ii&&(n.state=oi,n.timer.restart(a,n.delay,n.time),a(r))})),n.state=ni,n.on.call("start",t,t.__data__,n.index,n.group),n.state===ni){for(n.state=ii,i=new Array(h=n.tween.length),u=0,c=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(i[++c]=f);i.length=c+1}}function a(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=ri,1),r=-1,s=i.length;++r<s;)i[r].call(t,o);n.state===ri&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var i in n.state=si,n.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=n,n.timer=qn(r,0,n.time)}(t,n,{name:e,index:i,group:o,on:Jn,tween:Qn,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:ti})}function li(t,e){var n=ci(t,e);if(n.state>ti)throw new Error("too late; already scheduled");return n}function ui(t,e){var n=ci(t,e);if(n.state>ii)throw new Error("too late; already running");return n}function ci(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function hi(t,e){var n,i,o,r=t.__transition,s=!0;if(r){for(o in e=null==e?null:e+"",r)(n=r[o]).name===e?(i=n.state>ni&&n.state<ri,n.state=si,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete r[o]):s=!1;s&&delete t.__transition}}function fi(t,e){var n,i;return function(){var o=ui(this,t),r=o.tween;if(r!==n)for(var s=0,a=(i=n=r).length;s<a;++s)if(i[s].name===e){(i=i.slice()).splice(s,1);break}o.tween=i}}function di(t,e,n){var i,o;if("function"!=typeof n)throw new Error;return function(){var r=ui(this,t),s=r.tween;if(s!==i){o=(i=s).slice();for(var a={name:e,value:n},l=0,u=o.length;l<u;++l)if(o[l].name===e){o[l]=a;break}l===u&&o.push(a)}r.tween=o}}function pi(t,e,n){var i=t._id;return t.each((function(){var t=ui(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ci(t,i).value[e]}}function gi(t,e){var n;return("number"==typeof e?dn:e instanceof Fe?fn:(n=Fe(e))?(e=n,fn):mn)(t,e)}function mi(t){return function(){this.removeAttribute(t)}}function _i(t){return function(){this.removeAttributeNS(t.space,t.local)}}function vi(t,e,n){var i,o,r=n+"";return function(){var s=this.getAttribute(t);return s===r?null:s===i?o:o=e(i=s,n)}}function yi(t,e,n){var i,o,r=n+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===r?null:s===i?o:o=e(i=s,n)}}function bi(t,e,n){var i,o,r;return function(){var s,a,l=n(this);if(null!=l)return(s=this.getAttribute(t))===(a=l+"")?null:s===i&&a===o?r:(o=a,r=e(i=s,l));this.removeAttribute(t)}}function wi(t,e,n){var i,o,r;return function(){var s,a,l=n(this);if(null!=l)return(s=this.getAttributeNS(t.space,t.local))===(a=l+"")?null:s===i&&a===o?r:(o=a,r=e(i=s,l));this.removeAttributeNS(t.space,t.local)}}function Ei(t,e){var n,i;function o(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,o)),n}return o._value=e,o}function xi(t,e){var n,i;function o(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,o)),n}return o._value=e,o}function ki(t,e){return function(){li(this,t).delay=+e.apply(this,arguments)}}function Mi(t,e){return e=+e,function(){li(this,t).delay=e}}function Li(t,e){return function(){ui(this,t).duration=+e.apply(this,arguments)}}function Ti(t,e){return e=+e,function(){ui(this,t).duration=e}}var zi=lt.prototype.constructor;function Ci(t){return function(){this.style.removeProperty(t)}}var Oi=0;function Si(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function Ai(){return++Oi}var Bi=lt.prototype;Si.prototype={constructor:Si,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=a(t));for(var i=this._groups,o=i.length,r=new Array(o),s=0;s<o;++s)for(var l,u,c=i[s],h=c.length,f=r[s]=new Array(h),d=0;d<h;++d)(l=c[d])&&(u=t.call(l,l.__data__,d,c))&&("__data__"in l&&(u.__data__=l.__data__),f[d]=u,ai(f[d],e,n,d,f,ci(l,n)));return new Si(r,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=u(t));for(var i=this._groups,o=i.length,r=[],s=[],a=0;a<o;++a)for(var l,c=i[a],h=c.length,f=0;f<h;++f)if(l=c[f]){for(var d,p=t.call(l,l.__data__,f,c),g=ci(l,n),m=0,_=p.length;m<_;++m)(d=p[m])&&ai(d,e,n,m,p,g);r.push(p),s.push(l)}return new Si(r,s,e,n)},filter:function(t){"function"!=typeof t&&(t=c(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var r,s=e[o],a=s.length,l=i[o]=[],u=0;u<a;++u)(r=s[u])&&t.call(r,r.__data__,u,s)&&l.push(r);return new Si(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,o=n.length,r=Math.min(i,o),s=new Array(i),a=0;a<r;++a)for(var l,u=e[a],c=n[a],h=u.length,f=s[a]=new Array(h),d=0;d<h;++d)(l=u[d]||c[d])&&(f[d]=l);for(;a<i;++a)s[a]=e[a];return new Si(s,this._parents,this._name,this._id)},selection:function(){return new zi(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ai(),i=this._groups,o=i.length,r=0;r<o;++r)for(var s,a=i[r],l=a.length,u=0;u<l;++u)if(s=a[u]){var c=ci(s,e);ai(s,t,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Si(i,this._parents,t,n)},call:Bi.call,nodes:Bi.nodes,node:Bi.node,size:Bi.size,empty:Bi.empty,each:Bi.each,on:function(t,e){var n=this._id;return arguments.length<2?ci(this.node(),n).on.on(t):this.each(function(t,e,n){var i,o,r=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?li:ui;return function(){var s=r(this,t),a=s.on;a!==i&&(o=(i=a).copy()).on(e,n),s.on=o}}(n,t,e))},attr:function(t,e){var i=n(t),o="transform"===i?Ln:gi;return this.attrTween(t,"function"==typeof e?(i.local?wi:bi)(i,o,pi(this,"attr."+t,e)):null==e?(i.local?_i:mi)(i):(i.local?yi:vi)(i,o,e))},attrTween:function(t,e){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;var o=n(t);return this.tween(i,(o.local?Ei:xi)(o,e))},style:function(t,e,n){var i="transform"==(t+="")?Mn:gi;return null==e?this.styleTween(t,function(t,e){var n,i,o;return function(){var r=T(this,t),s=(this.style.removeProperty(t),T(this,t));return r===s?null:r===n&&s===i?o:o=e(n=r,i=s)}}(t,i)).on("end.style."+t,Ci(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,o,r;return function(){var s=T(this,t),a=n(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=T(this,t)),s===l?null:s===i&&l===o?r:(o=l,r=e(i=s,a))}}(t,i,pi(this,"style."+t,e))).each(function(t,e){var n,i,o,r,s="style."+e,a="end."+s;return function(){var l=ui(this,t),u=l.on,c=null==l.value[s]?r||(r=Ci(e)):void 0;u===n&&o===c||(i=(n=u).copy()).on(a,o=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,o,r=n+"";return function(){var s=T(this,t);return s===r?null:s===i?o:o=e(i=s,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,n){var i,o;function r(){var r=e.apply(this,arguments);return r!==o&&(i=(o=r)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,r,n)),i}return r._value=e,r}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(pi(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,o=ci(this.node(),n).tween,r=0,s=o.length;r<s;++r)if((i=o[r]).name===t)return i.value;return null}return this.each((null==e?fi:di)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ki:Mi)(e,t)):ci(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Li:Ti)(e,t)):ci(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){ui(this,t).ease=e}}(e,t)):ci(this.node(),e).ease},end:function(){var t,e,n=this,i=n._id,o=n.size();return new Promise((function(r,s){var a={value:s},l={value:function(){0==--o&&r()}};n.each((function(){var n=ui(this,i),o=n.on;o!==t&&((e=(t=o).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),n.on=e}))}))}};var Ni={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Ui(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Ni.time=Zn(),Ni;return n}function Vi(t){return function(){return t}}function Ii(t,e,n){this.target=t,this.type=e,this.transform=n}function Ki(t,e,n){this.k=t,this.x=e,this.y=n}lt.prototype.interrupt=function(t){return this.each((function(){hi(this,t)}))},lt.prototype.transition=function(t){var e,n;t instanceof Si?(e=t._id,t=t._name):(e=Ai(),(n=Ni).time=Zn(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,r=0;r<o;++r)for(var s,a=i[r],l=a.length,u=0;u<l;++u)(s=a[u])&&ai(s,t,e,u,a,n||Ui(s,e));return new Si(i,this._parents,t,e)},Ki.prototype={constructor:Ki,scale:function(t){return 1===t?this:new Ki(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Ki(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Gi=new Ki(1,0,0);function Di(){J.stopImmediatePropagation()}function Pi(){J.preventDefault(),J.stopImmediatePropagation()}function Ri(){return!J.ctrlKey&&!J.button}function ji(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Zi(){return this.__zoom||Gi}function Hi(){return-J.deltaY*(1===J.deltaMode?.05:J.deltaMode?1:.002)}function Yi(){return navigator.maxTouchPoints||"ontouchstart"in this}function qi(t,e,n){var i=t.invertX(e[0][0])-n[0][0],o=t.invertX(e[1][0])-n[1][0],r=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function Xi(){var t,e,n=Ri,i=ji,o=qi,r=Hi,s=Yi,a=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],u=250,c=An,h=Te("start","zoom","end"),f=500,d=150,p=0;function g(t){t.property("__zoom",Zi).on("wheel.zoom",E).on("mousedown.zoom",x).on("dblclick.zoom",k).filter(s).on("touchstart.zoom",M).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(t,e){return(e=Math.max(a[0],Math.min(a[1],e)))===t.k?t:new Ki(e,t.x,t.y)}function _(t,e,n){var i=e[0]-n[0]*t.k,o=e[1]-n[1]*t.k;return i===t.x&&o===t.y?t:new Ki(t.k,i,o)}function v(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function y(t,e,n){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=this,o=arguments,r=b(t,o),s=i.apply(t,o),a=null==n?v(s):"function"==typeof n?n.apply(t,o):n,l=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=t.__zoom,h="function"==typeof e?e.apply(t,o):e,f=c(u.invert(a).concat(l/u.k),h.invert(a).concat(l/h.k));return function(t){if(1===t)t=h;else{var e=f(t),n=l/e[2];t=new Ki(n,a[0]-e[0]*n,a[1]-e[1]*n)}r.zoom(null,t)}}))}function b(t,e,n){return!n&&t.__zooming||new w(t,e)}function w(t,e){this.that=t,this.args=e,this.active=0,this.extent=i.apply(t,e),this.taps=0}function E(){if(n.apply(this,arguments)){var t=b(this,arguments),e=this.__zoom,i=Math.max(a[0],Math.min(a[1],e.k*Math.pow(2,r.apply(this,arguments)))),s=ft(this);if(t.wheel)t.mouse[0][0]===s[0]&&t.mouse[0][1]===s[1]||(t.mouse[1]=e.invert(t.mouse[0]=s)),clearTimeout(t.wheel);else{if(e.k===i)return;t.mouse=[s,e.invert(s)],hi(this),t.start()}Pi(),t.wheel=setTimeout((function(){t.wheel=null,t.end()}),d),t.zoom("mouse",o(_(m(e,i),t.mouse[0],t.mouse[1]),t.extent,l))}}function x(){if(!e&&n.apply(this,arguments)){var t=b(this,arguments,!0),i=ut(J.view).on("mousemove.zoom",(function(){if(Pi(),!t.moved){var e=J.clientX-s,n=J.clientY-a;t.moved=e*e+n*n>p}t.zoom("mouse",o(_(t.that.__zoom,t.mouse[0]=ft(t.that),t.mouse[1]),t.extent,l))}),!0).on("mouseup.zoom",(function(){i.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,i=ut(t).on("dragstart.drag",null);e&&(i.on("click.drag",Se,!0),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(J.view,t.moved),Pi(),t.end()}),!0),r=ft(this),s=J.clientX,a=J.clientY;!function(t){var e=t.document.documentElement,n=ut(t).on("dragstart.drag",Se,!0);"onselectstart"in e?n.on("selectstart.drag",Se,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(J.view),Di(),t.mouse=[r,this.__zoom.invert(r)],hi(this),t.start()}}function k(){if(n.apply(this,arguments)){var t=this.__zoom,e=ft(this),r=t.invert(e),s=t.k*(J.shiftKey?.5:2),a=o(_(m(t,s),e,r),i.apply(this,arguments),l);Pi(),u>0?ut(this).transition().duration(u).call(y,a,e):ut(this).call(g.transform,a)}}function M(){if(n.apply(this,arguments)){var e,i,o,r,s=J.touches,a=s.length,l=b(this,arguments,J.changedTouches.length===a);for(Di(),i=0;i<a;++i)r=[r=dt(this,s,(o=s[i]).identifier),this.__zoom.invert(r),o.identifier],l.touch0?l.touch1||l.touch0[2]===r[2]||(l.touch1=r,l.taps=0):(l.touch0=r,e=!0,l.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(l.taps<2&&(t=setTimeout((function(){t=null}),f)),hi(this),l.start())}}function L(){if(this.__zooming){var e,n,i,r,s=b(this,arguments),a=J.changedTouches,u=a.length;for(Pi(),t&&(t=clearTimeout(t)),s.taps=0,e=0;e<u;++e)i=dt(this,a,(n=a[e]).identifier),s.touch0&&s.touch0[2]===n.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===n.identifier&&(s.touch1[0]=i);if(n=s.that.__zoom,s.touch1){var c=s.touch0[0],h=s.touch0[1],f=s.touch1[0],d=s.touch1[1],p=(p=f[0]-c[0])*p+(p=f[1]-c[1])*p,g=(g=d[0]-h[0])*g+(g=d[1]-h[1])*g;n=m(n,Math.sqrt(p/g)),i=[(c[0]+f[0])/2,(c[1]+f[1])/2],r=[(h[0]+d[0])/2,(h[1]+d[1])/2]}else{if(!s.touch0)return;i=s.touch0[0],r=s.touch0[1]}s.zoom("touch",o(_(n,i,r),s.extent,l))}}function T(){if(this.__zooming){var t,n,i=b(this,arguments),o=J.changedTouches,r=o.length;for(Di(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),f),t=0;t<r;++t)n=o[t],i.touch0&&i.touch0[2]===n.identifier?delete i.touch0:i.touch1&&i.touch1[2]===n.identifier&&delete i.touch1;if(i.touch1&&!i.touch0&&(i.touch0=i.touch1,delete i.touch1),i.touch0)i.touch0[1]=this.__zoom.invert(i.touch0[0]);else if(i.end(),2===i.taps){var s=ut(this).on("dblclick.zoom");s&&s.apply(this,arguments)}}}return g.transform=function(t,e,n){var i=t.selection?t.selection():t;i.property("__zoom",Zi),t!==i?y(t,e,n):i.interrupt().each((function(){b(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},g.scaleBy=function(t,e,n){g.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n)},g.scaleTo=function(t,e,n){g.transform(t,(function(){var t=i.apply(this,arguments),r=this.__zoom,s=null==n?v(t):"function"==typeof n?n.apply(this,arguments):n,a=r.invert(s),u="function"==typeof e?e.apply(this,arguments):e;return o(_(m(r,u),s,a),t,l)}),n)},g.translateBy=function(t,e,n){g.transform(t,(function(){return o(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),i.apply(this,arguments),l)}))},g.translateTo=function(t,e,n,r){g.transform(t,(function(){var t=i.apply(this,arguments),s=this.__zoom,a=null==r?v(t):"function"==typeof r?r.apply(this,arguments):r;return o(Gi.translate(a[0],a[1]).scale(s.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,l)}),r)},w.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){!function(t,e,n,i){var o=J;t.sourceEvent=J,J=t;try{return e.apply(n,i)}finally{J=o}}(new Ii(g,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},g.wheelDelta=function(t){return arguments.length?(r="function"==typeof t?t:Vi(+t),g):r},g.filter=function(t){return arguments.length?(n="function"==typeof t?t:Vi(!!t),g):n},g.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Vi(!!t),g):s},g.extent=function(t){return arguments.length?(i="function"==typeof t?t:Vi([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),g):i},g.scaleExtent=function(t){return arguments.length?(a[0]=+t[0],a[1]=+t[1],g):[a[0],a[1]]},g.translateExtent=function(t){return arguments.length?(l[0][0]=+t[0][0],l[1][0]=+t[1][0],l[0][1]=+t[0][1],l[1][1]=+t[1][1],g):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},g.constrain=function(t){return arguments.length?(o=t,g):o},g.duration=function(t){return arguments.length?(u=+t,g):u},g.interpolate=function(t){return arguments.length?(c=t,g):c},g.on=function(){var t=h.on.apply(h,arguments);return t===h?g:t},g.clickDistance=function(t){return arguments.length?(p=(t=+t)*t,g):Math.sqrt(p)},g}Ki.prototype;var Wi=function(){function t(t){this._self=t,this.zoomTypes={normal:null,animated:null,fastAnimated:null},this.scale={x:null,y:null,k:null},this.zoomLevels={VENUE:null,BLOCK:null,SEAT:null},this.minZoom=null,this.activeBlocks=[],this.zoomLevel=xt.VENUE,this.dispatchZoomEvent()}return t.prototype.init=function(){var t=this;console.log("zoom init"),this.calculateZoomLevels(),this.zoomInit(),this._self.eventManager.addEventListener(Et.KEYDOWN_SVG,(function(e){17!=e.which&&91!==e.which||(t._self.eventManager.dispatch(Et.MULTI_SELECT_ENABLE,e),J.preventDefault(),t.zoomDisable())})),this._self.eventManager.addEventListener(Et.KEYUP_SVG,(function(e){t._self.eventManager.dispatch(Et.MULTI_SELECT_DISABLE,e),J.preventDefault(),t.zoomEnable()}))},t.prototype.zoomInit=function(){console.info("zoomInit"),this.zoomTypes.normal=Xi().scaleExtent([this._self.config.min_zoom,this._self.config.max_zoom]).on("end",this.zoomEnd(this)).on("zoom",this.zoomHand(this)),this.zoomTypes.animated=Xi().scaleExtent([this._self.config.min_zoom,this._self.config.max_zoom]).on("end",this.animatedZoomEnd(this)).on("zoom",this.zoomHandAnimated(this)),this.zoomTypes.fastAnimated=Xi().scaleExtent([this._self.config.min_zoom,this._self.config.max_zoom]).on("end",this.animatedFastZoomEnd(this)).on("zoom",this.zoomHandFastAnimated(this)),this._self.svg.node.call(this.zoomTypes.normal),this._self.svg.node.on("dblclick.zoom",null)},t.prototype.zoomEnd=function(t){return console.info("zoomEnd"),function(){var e=J.transform.x,n=J.transform.y,i=J.transform.k;t._self.svg.stage.node.interrupt().attr("transform","translate("+e+","+n+")scale("+i+")"),t.calculateActiveBlocks(),t.calculateZoomLevel(i)}},t.prototype.animatedZoomEnd=function(t){return console.info("animatedZoomEnd"),function(){var e=J.transform.x,n=J.transform.y,i=J.transform.k;t._self.svg.stage.node.interrupt().transition().duration(t._self.config.animation_speed).attr("transform","translate("+e+","+n+")scale("+i+")"),t.calculateActiveBlocks(),t.calculateZoomLevel(i)}},t.prototype.animatedFastZoomEnd=function(t){return console.info("animatedFastZoomEnd"),function(){var e=J.transform.x,n=J.transform.y,i=J.transform.k;t._self.svg.stage.node.interrupt().transition().duration(t._self.config.animation_speed/2).attr("transform","translate("+e+","+n+")scale("+i+")"),t.calculateActiveBlocks(),t.calculateZoomLevel(i)}},t.prototype.zoomHand=function(t){return console.info("zoomHand"),function(){var e=J.transform.x,n=J.transform.y,i=J.transform.k;t._self.svg.stage.node.interrupt().attr("transform","translate("+e+","+n+")scale("+i+")"),t.calculateZoomLevel(i)}},t.prototype.zoomHandAnimated=function(t){return console.info("zoomHandAnimated"),function(){var e=J.transform.x,n=J.transform.y,i=J.transform.k;t._self.svg.stage.node.interrupt().transition().duration(t._self.config.animation_speed).attr("transform","translate("+e+","+n+")scale("+i+")")}},t.prototype.zoomHandFastAnimated=function(t){return console.info("zoomHandFastAnimated"),function(){var e=J.transform.x,n=J.transform.y,i=J.transform.k;t._self.svg.stage.node.interrupt().transition().duration(t._self.config.animation_speed/2).attr("transform","translate("+e+","+n+")scale("+i+")")}},t.prototype.calculateZoomLevel=function(t){console.info("calculateZoomLevel");var e=this._self.config.max_zoom-.2,n=this.zoomLevels.BLOCK.k,i=this.zoomLevels.VENUE.k,o=null,r=this._self.data.getBlocks().length;t>=e?o=xt.SEAT:t>=n?o=xt.BLOCK:t>=i&&r>1&&(o=xt.VENUE),o!==this.zoomLevel&&(this.zoomLevel=o,this.dispatchZoomEvent())},t.prototype.canvasScopeHandler=function(){if(!1!==this._self.config.canvas_stageout_control){var t=this._self.svg.stage.blocks.node.node().getBoundingClientRect(),e=this._self.svg.node.node().getBoundingClientRect();(this.zoomLevel===xt.VENUE||this.zoomLevel===xt.BLOCK&&1===this._self.data.getBlocks().length||this.zoomLevel==xt.SEAT&&this.zoomLevels.BLOCK&&this.zoomLevels.BLOCK.k===this._self.config.max_zoom)&&(t.left<e.left||t.top<e.top||t.right>e.right||t.bottom>e.bottom)&&this.zoomToVenue(!0,!0)}},t.prototype.calculateZoomLevels=function(t){void 0===t&&(t=this._self.data.getBlocks()),console.info("calculateZoomLevels");var e=this._self.windowManager,n=e.stage;t.map((function(t){t.seats.map((function(e){e.x<t.x&&(t.x=e.x),e.y<t.y&&(t.y=e.y),e.x>n.width&&(n.width=e.x),e.y>n.height&&(n.height=e.y)})),t.labels.map((function(e){e.x<t.x&&(t.x=e.x),e.y<t.y&&(t.y=e.y),e.x>n.width&&(n.width=e.x),e.y>n.height&&(n.height=e.y)}))})),e.width&&e.height&&(this.scale.x=e.width/n.width-e.width/n.width/5,this.scale.y=e.height/n.height-e.height/n.height/5),this.scale.k=this.scale.x<this.scale.y?this.scale.x:this.scale.y,this.minZoom=this.scale.k<1?this.scale.k:1,this.scale.k=this.scale.k>this._self.config.max_zoom?this._self.config.max_zoom:this.scale.k;var i=n.width/2,o=n.height/2;return this.zoomLevels.VENUE={x:i,y:o,k:this.scale.k-.01},1===this._self.data.getBlocks().length&&this.zoomLevels.BLOCK&&(this.zoomLevels.VENUE=this.zoomLevels.BLOCK),this},t.prototype.calculateActiveBlocks=function(t){var e=this;if(void 0===t&&(t=this._self.data.getBlocks()),this.activeBlocks=[],t.map((function(t){var n=e._self.svg.stage.blocks.getBlock(t.id);if(n){var i=n.node.node().getBoundingClientRect(),o=n.node.node().getBBox();if(t.bbox=o,e._self.windowManager.width&&e._self.windowManager.height){var r=e._self.windowManager.width/o.width-e._self.windowManager.width/o.width/3,s=e._self.windowManager.height/o.height-e._self.windowManager.height/o.height/3,a=r<s?r:s;r+=o.x+o.width/2,s+=o.y+o.height/2,a=a>e._self.config.max_zoom?e._self.config.max_zoom:a,t.zoom_bbox={x:r,y:s,k:a};var l=Math.max(0,Math.min(e._self.windowManager.width,i.right)-Math.max(0,i.left))*Math.max(0,Math.min(e._self.windowManager.height,i.bottom)-Math.max(0,i.top)),u=100*l/(e._self.windowManager.width*e._self.windowManager.height);l>0&&e.activeBlocks.push({block:n,ratio:Number(u.toFixed(2))})}}})),this.activeBlocks=this.activeBlocks.sort((function(t,e){return e.ratio-t.ratio})),this.activeBlocks.length){var n=this.activeBlocks[0].block.item;this.zoomLevels.BLOCK=n.zoom_bbox}return this.activeBlocks},t.prototype.zoomToSelection=function(t){void 0===t&&(t=!0);var e=ft(this._self.svg.stage.blocks.node.node()),n=e[0],i=e[1],o=this._self.config.max_zoom;this.zoomLevels.SEAT={x:n,y:i,k:o},t?this._self.svg.node.interrupt().call(this.zoomTypes.animated.translateTo,n,i).call(this.zoomTypes.animated.scaleTo,o):this._self.svg.node.interrupt().call(this.zoomTypes.normal.translateTo,n,i).call(this.zoomTypes.normal.scaleTo,o),this.zoomLevel=xt.SEAT,this.dispatchZoomEvent()},t.prototype.zoomToBlock=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=!1);var i=this._self.data.getBlocks().find((function(e){return e.id.toString()===t.toString()}));i&&(e?n?this._self.svg.node.interrupt().call(this.zoomTypes.fastAnimated.translateTo,i.zoom_bbox.x,i.zoom_bbox.y).call(this.zoomTypes.fastAnimated.scaleTo,i.zoom_bbox.k):this._self.svg.node.interrupt().call(this.zoomTypes.animated.translateTo,i.zoom_bbox.x,i.zoom_bbox.y).call(this.zoomTypes.animated.scaleTo,i.zoom_bbox.k):this._self.svg.node.interrupt().call(this.zoomTypes.normal.translateTo,i.zoom_bbox.x,i.zoom_bbox.y).call(this.zoomTypes.normal.scaleTo,i.zoom_bbox.k),i.zoom_bbox.k===this._self.config.max_zoom?this.zoomLevel=xt.SEAT:this.zoomLevel=xt.BLOCK,this.dispatchZoomEvent())},t.prototype.zoomToVenue=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1),console.info("zoomToVenue");var n=this.zoomLevels.VENUE.x,i=this.zoomLevels.VENUE.y,o=this.zoomLevels.VENUE.k;if(this._self.config.min_zoom=o,this.zoomInit(),1!==this._self.data.getBlocks().length)n&&i&&o&&(t?e?this._self.svg.node.interrupt().call(this.zoomTypes.fastAnimated.translateTo,n,i).call(this.zoomTypes.fastAnimated.scaleTo,o):this._self.svg.node.interrupt().call(this.zoomTypes.animated.translateTo,n,i).call(this.zoomTypes.animated.scaleTo,o):this._self.svg.node.interrupt().call(this.zoomTypes.normal.translateTo,n,i).call(this.zoomTypes.normal.scaleTo,o),this.zoomLevel=xt.VENUE,this.dispatchZoomEvent());else{var r=this._self.data.getBlocks()[0];this.zoomToBlock(r.id,t,e)}},t.prototype.zoomEnable=function(){return this._self.svg.node.call(this.zoomTypes.normal),this},t.prototype.zoomDisable=function(){return this._self.svg.node.on(".zoom",null),this},t.prototype.getZoomLevelValues=function(t){return this.zoomLevels[t]},t.prototype.getActiveZoom=function(){return this.zoomLevels[this.zoomLevel]},t.prototype.dispatchZoomEvent=function(){this._self.eventManager.dispatch(Et.ZOOM_LEVEL_CHANGE,{level:this.zoomLevel,values:this.getZoomLevelValues(this.zoomLevel)})},t}(),Fi={};Object.defineProperty(Fi,"__esModule",{value:!0});var $i=Fi.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length},Ji=function(){function t(t){this._self=t,this.events=[]}return t.prototype.addEventListener=function(t,e){if($i(t))for(var n=0;n<t.length;n++)this.events.push({type:t[n],fn:e});else this.events.push({type:t,fn:e});return this},t.prototype.dispatch=function(t,e){return this.events.filter((function(e){return e.type===t})).map((function(t){return t.fn(e)})),this},t}(),Qi=function(){function t(t){var e=this;this.parent=t,this.width=null,this.height=null,this.stage={width:null,height:null},ut(window).on("resize.svg",(function(){e.resizeHandler()}))}return t.prototype.resizeHandler=function(){var t=ut(this.parent.container_selector).node().getBoundingClientRect();return this.width=t.width,this.height=t.height,this.parent.svg.node.attr("width",t.width),this.parent.svg.node.attr("height",t.height),this.parent.global.eventManager.dispatch(Et.RESIZE_WINDOW,t),this},t}(),to=function(t,e){var n=this;this.container_selector=t,this.node=null;var i=this;this.config=new Me(e),this.eventManager=new Ji(this),this.addEventListener=this.eventManager.addEventListener,this.node=ut(t),this.windowManager=new Qi(this),this.zoomManager=new Wi(this),this.data=new ve(this),this.global={eventManager:this.eventManager,windowManager:this.windowManager,config:this.config,data:this.data,zoomManager:this.zoomManager,root:this,svg:this.svg,multi_select:!1,best_available:!1},ut(window).on("keydown.dispatch",(function(t,e,n){i.eventManager.dispatch(Et.KEYDOWN_SVG,J)})),ut(window).on("keyup.dispatch",(function(t,e,n){i.eventManager.dispatch(Et.KEYUP_SVG,J)})),this.dev=new _e(this),this.svg=new me(this),this.svg.domGenerate(this.node),this.svg.update(),this.windowManager.resizeHandler(),this.zoomManager.init(),this.eventManager.addEventListener(Et.CLICK_ZOOM_OUT,(function(){return n.zoomManager.zoomToVenue()})),this.eventManager.addEventListener(Et.MULTI_SELECT_ENABLE,(function(){n.global.multi_select=!0,n.node.classed("multi-select-enable",!0)})),this.eventManager.addEventListener(Et.MULTI_SELECT_DISABLE,(function(){n.global.multi_select=!1,n.node.classed("multi-select-enable",!1)})),this.eventManager.addEventListener(Et.BEST_AVAILABLE_ENABLE,(function(){n.global.best_available=!0})),this.eventManager.addEventListener(Et.MBEST_AVAILABLE_DISABLE,(function(){n.global.best_available=!1})),this.eventManager.addEventListener(Et.ZOOM_LEVEL_CHANGE,(function(t){t.level===xt.VENUE||t.level===xt.BLOCK?ut(n.config.zoom_out_button).style("display","none"):t.level===xt.SEAT&&ut(n.config.zoom_out_button).style("display","block")})),ut(this.config.zoom_out_button).on("click",(function(){n.zoomManager.zoomToVenue(!0)})),this.eventManager.addEventListener(Et.ADD_BLOCK,(function(t){n.svg.stage.blocks.update(),n.windowManager.resizeHandler(),n.zoomManager.calculateZoomLevels(n.data.getBlocks()),n.zoomManager.calculateActiveBlocks(n.data.getBlocks()),n.windowManager.resizeHandler(),n.zoomManager.zoomToVenue(!1)})),this.eventManager.dispatch(Et.READY,this)};export{to as SeatMapCanvas};
16
+ //# sourceMappingURL=seatmap.canvas.js.map