@p4ulcristian/iris-layout 0.2.10 → 0.2.11

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 (201) hide show
  1. package/dist/iris-layout.js +60 -45
  2. package/dist/styles.css +172 -2
  3. package/package.json +1 -1
  4. package/dist/cljs-runtime/cljs.core.js +0 -38746
  5. package/dist/cljs-runtime/cljs.core.js.map +0 -1
  6. package/dist/cljs-runtime/cljs.pprint.js +0 -8400
  7. package/dist/cljs-runtime/cljs.pprint.js.map +0 -1
  8. package/dist/cljs-runtime/cljs.stacktrace.js +0 -561
  9. package/dist/cljs-runtime/cljs.stacktrace.js.map +0 -1
  10. package/dist/cljs-runtime/cljs_env.js +0 -1286
  11. package/dist/cljs-runtime/clojure.data.js +0 -295
  12. package/dist/cljs-runtime/clojure.data.js.map +0 -1
  13. package/dist/cljs-runtime/clojure.set.js +0 -382
  14. package/dist/cljs-runtime/clojure.set.js.map +0 -1
  15. package/dist/cljs-runtime/clojure.string.js +0 -480
  16. package/dist/cljs-runtime/clojure.string.js.map +0 -1
  17. package/dist/cljs-runtime/clojure.walk.js +0 -132
  18. package/dist/cljs-runtime/clojure.walk.js.map +0 -1
  19. package/dist/cljs-runtime/devtools.async.js +0 -90
  20. package/dist/cljs-runtime/devtools.async.js.map +0 -1
  21. package/dist/cljs-runtime/devtools.context.js +0 -11
  22. package/dist/cljs-runtime/devtools.context.js.map +0 -1
  23. package/dist/cljs-runtime/devtools.core.js +0 -175
  24. package/dist/cljs-runtime/devtools.core.js.map +0 -1
  25. package/dist/cljs-runtime/devtools.defaults.js +0 -20
  26. package/dist/cljs-runtime/devtools.defaults.js.map +0 -1
  27. package/dist/cljs-runtime/devtools.format.js +0 -631
  28. package/dist/cljs-runtime/devtools.format.js.map +0 -1
  29. package/dist/cljs-runtime/devtools.formatters.budgeting.js +0 -182
  30. package/dist/cljs-runtime/devtools.formatters.budgeting.js.map +0 -1
  31. package/dist/cljs-runtime/devtools.formatters.core.js +0 -220
  32. package/dist/cljs-runtime/devtools.formatters.core.js.map +0 -1
  33. package/dist/cljs-runtime/devtools.formatters.helpers.js +0 -228
  34. package/dist/cljs-runtime/devtools.formatters.helpers.js.map +0 -1
  35. package/dist/cljs-runtime/devtools.formatters.js +0 -261
  36. package/dist/cljs-runtime/devtools.formatters.js.map +0 -1
  37. package/dist/cljs-runtime/devtools.formatters.markup.js +0 -1174
  38. package/dist/cljs-runtime/devtools.formatters.markup.js.map +0 -1
  39. package/dist/cljs-runtime/devtools.formatters.printing.js +0 -313
  40. package/dist/cljs-runtime/devtools.formatters.printing.js.map +0 -1
  41. package/dist/cljs-runtime/devtools.formatters.state.js +0 -325
  42. package/dist/cljs-runtime/devtools.formatters.state.js.map +0 -1
  43. package/dist/cljs-runtime/devtools.formatters.templating.js +0 -666
  44. package/dist/cljs-runtime/devtools.formatters.templating.js.map +0 -1
  45. package/dist/cljs-runtime/devtools.hints.js +0 -193
  46. package/dist/cljs-runtime/devtools.hints.js.map +0 -1
  47. package/dist/cljs-runtime/devtools.munging.js +0 -1058
  48. package/dist/cljs-runtime/devtools.munging.js.map +0 -1
  49. package/dist/cljs-runtime/devtools.prefs.js +0 -87
  50. package/dist/cljs-runtime/devtools.prefs.js.map +0 -1
  51. package/dist/cljs-runtime/devtools.preload.js +0 -11
  52. package/dist/cljs-runtime/devtools.preload.js.map +0 -1
  53. package/dist/cljs-runtime/devtools.protocols.js +0 -98
  54. package/dist/cljs-runtime/devtools.protocols.js.map +0 -1
  55. package/dist/cljs-runtime/devtools.reporter.js +0 -81
  56. package/dist/cljs-runtime/devtools.reporter.js.map +0 -1
  57. package/dist/cljs-runtime/devtools.toolbox.js +0 -141
  58. package/dist/cljs-runtime/devtools.toolbox.js.map +0 -1
  59. package/dist/cljs-runtime/devtools.util.js +0 -517
  60. package/dist/cljs-runtime/devtools.util.js.map +0 -1
  61. package/dist/cljs-runtime/devtools.version.js +0 -9
  62. package/dist/cljs-runtime/devtools.version.js.map +0 -1
  63. package/dist/cljs-runtime/goog.array.array.js +0 -659
  64. package/dist/cljs-runtime/goog.array.array.js.map +0 -9
  65. package/dist/cljs-runtime/goog.asserts.asserts.js +0 -133
  66. package/dist/cljs-runtime/goog.asserts.asserts.js.map +0 -9
  67. package/dist/cljs-runtime/goog.asserts.dom.js +0 -90
  68. package/dist/cljs-runtime/goog.asserts.dom.js.map +0 -9
  69. package/dist/cljs-runtime/goog.async.nexttick.js +0 -93
  70. package/dist/cljs-runtime/goog.async.nexttick.js.map +0 -9
  71. package/dist/cljs-runtime/goog.base.js +0 -1261
  72. package/dist/cljs-runtime/goog.base.js.map +0 -9
  73. package/dist/cljs-runtime/goog.collections.maps.js +0 -82
  74. package/dist/cljs-runtime/goog.collections.maps.js.map +0 -9
  75. package/dist/cljs-runtime/goog.debug.entrypointregistry.js +0 -44
  76. package/dist/cljs-runtime/goog.debug.entrypointregistry.js.map +0 -9
  77. package/dist/cljs-runtime/goog.debug.error.js +0 -30
  78. package/dist/cljs-runtime/goog.debug.error.js.map +0 -9
  79. package/dist/cljs-runtime/goog.dom.asserts.js +0 -40
  80. package/dist/cljs-runtime/goog.dom.asserts.js.map +0 -9
  81. package/dist/cljs-runtime/goog.dom.browserfeature.js +0 -21
  82. package/dist/cljs-runtime/goog.dom.browserfeature.js.map +0 -9
  83. package/dist/cljs-runtime/goog.dom.dom.js +0 -1087
  84. package/dist/cljs-runtime/goog.dom.dom.js.map +0 -9
  85. package/dist/cljs-runtime/goog.dom.element.js +0 -69
  86. package/dist/cljs-runtime/goog.dom.element.js.map +0 -9
  87. package/dist/cljs-runtime/goog.dom.htmlelement.js +0 -7
  88. package/dist/cljs-runtime/goog.dom.htmlelement.js.map +0 -9
  89. package/dist/cljs-runtime/goog.dom.nodetype.js +0 -6
  90. package/dist/cljs-runtime/goog.dom.nodetype.js.map +0 -9
  91. package/dist/cljs-runtime/goog.dom.safe.js +0 -277
  92. package/dist/cljs-runtime/goog.dom.safe.js.map +0 -9
  93. package/dist/cljs-runtime/goog.dom.tagname.js +0 -147
  94. package/dist/cljs-runtime/goog.dom.tagname.js.map +0 -9
  95. package/dist/cljs-runtime/goog.dom.tags.js +0 -10
  96. package/dist/cljs-runtime/goog.dom.tags.js.map +0 -9
  97. package/dist/cljs-runtime/goog.flags.flags.js +0 -12
  98. package/dist/cljs-runtime/goog.flags.flags.js.map +0 -9
  99. package/dist/cljs-runtime/goog.fs.blob.js +0 -38
  100. package/dist/cljs-runtime/goog.fs.blob.js.map +0 -9
  101. package/dist/cljs-runtime/goog.fs.url.js +0 -37
  102. package/dist/cljs-runtime/goog.fs.url.js.map +0 -9
  103. package/dist/cljs-runtime/goog.functions.functions.js +0 -211
  104. package/dist/cljs-runtime/goog.functions.functions.js.map +0 -9
  105. package/dist/cljs-runtime/goog.html.safehtml.js +0 -321
  106. package/dist/cljs-runtime/goog.html.safehtml.js.map +0 -9
  107. package/dist/cljs-runtime/goog.html.safescript.js +0 -65
  108. package/dist/cljs-runtime/goog.html.safescript.js.map +0 -9
  109. package/dist/cljs-runtime/goog.html.safestyle.js +0 -175
  110. package/dist/cljs-runtime/goog.html.safestyle.js.map +0 -9
  111. package/dist/cljs-runtime/goog.html.safestylesheet.js +0 -99
  112. package/dist/cljs-runtime/goog.html.safestylesheet.js.map +0 -9
  113. package/dist/cljs-runtime/goog.html.safeurl.js +0 -231
  114. package/dist/cljs-runtime/goog.html.safeurl.js.map +0 -9
  115. package/dist/cljs-runtime/goog.html.trustedresourceurl.js +0 -123
  116. package/dist/cljs-runtime/goog.html.trustedresourceurl.js.map +0 -9
  117. package/dist/cljs-runtime/goog.html.trustedtypes.js +0 -16
  118. package/dist/cljs-runtime/goog.html.trustedtypes.js.map +0 -9
  119. package/dist/cljs-runtime/goog.html.uncheckedconversions.js +0 -52
  120. package/dist/cljs-runtime/goog.html.uncheckedconversions.js.map +0 -9
  121. package/dist/cljs-runtime/goog.labs.useragent.browser.js +0 -352
  122. package/dist/cljs-runtime/goog.labs.useragent.browser.js.map +0 -9
  123. package/dist/cljs-runtime/goog.labs.useragent.engine.js +0 -73
  124. package/dist/cljs-runtime/goog.labs.useragent.engine.js.map +0 -9
  125. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropydata.js +0 -14
  126. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropydata.js.map +0 -9
  127. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropyvalue.js +0 -74
  128. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropyvalue.js.map +0 -9
  129. package/dist/cljs-runtime/goog.labs.useragent.platform.js +0 -147
  130. package/dist/cljs-runtime/goog.labs.useragent.platform.js.map +0 -9
  131. package/dist/cljs-runtime/goog.labs.useragent.useragent.js +0 -21
  132. package/dist/cljs-runtime/goog.labs.useragent.useragent.js.map +0 -9
  133. package/dist/cljs-runtime/goog.labs.useragent.util.js +0 -81
  134. package/dist/cljs-runtime/goog.labs.useragent.util.js.map +0 -9
  135. package/dist/cljs-runtime/goog.math.coordinate.js +0 -97
  136. package/dist/cljs-runtime/goog.math.coordinate.js.map +0 -9
  137. package/dist/cljs-runtime/goog.math.integer.js +0 -445
  138. package/dist/cljs-runtime/goog.math.integer.js.map +0 -9
  139. package/dist/cljs-runtime/goog.math.long.js +0 -437
  140. package/dist/cljs-runtime/goog.math.long.js.map +0 -9
  141. package/dist/cljs-runtime/goog.math.math.js +0 -158
  142. package/dist/cljs-runtime/goog.math.math.js.map +0 -9
  143. package/dist/cljs-runtime/goog.math.size.js +0 -76
  144. package/dist/cljs-runtime/goog.math.size.js.map +0 -9
  145. package/dist/cljs-runtime/goog.object.object.js +0 -284
  146. package/dist/cljs-runtime/goog.object.object.js.map +0 -9
  147. package/dist/cljs-runtime/goog.reflect.reflect.js +0 -32
  148. package/dist/cljs-runtime/goog.reflect.reflect.js.map +0 -9
  149. package/dist/cljs-runtime/goog.string.const.js +0 -35
  150. package/dist/cljs-runtime/goog.string.const.js.map +0 -9
  151. package/dist/cljs-runtime/goog.string.internal.js +0 -119
  152. package/dist/cljs-runtime/goog.string.internal.js.map +0 -9
  153. package/dist/cljs-runtime/goog.string.string.js +0 -462
  154. package/dist/cljs-runtime/goog.string.string.js.map +0 -9
  155. package/dist/cljs-runtime/goog.string.stringbuffer.js +0 -32
  156. package/dist/cljs-runtime/goog.string.stringbuffer.js.map +0 -9
  157. package/dist/cljs-runtime/goog.string.typedstring.js +0 -9
  158. package/dist/cljs-runtime/goog.string.typedstring.js.map +0 -9
  159. package/dist/cljs-runtime/goog.structs.structs.js +0 -199
  160. package/dist/cljs-runtime/goog.structs.structs.js.map +0 -9
  161. package/dist/cljs-runtime/goog.uri.uri.js +0 -628
  162. package/dist/cljs-runtime/goog.uri.uri.js.map +0 -9
  163. package/dist/cljs-runtime/goog.uri.utils.js +0 -326
  164. package/dist/cljs-runtime/goog.uri.utils.js.map +0 -9
  165. package/dist/cljs-runtime/goog.useragent.useragent.js +0 -139
  166. package/dist/cljs-runtime/goog.useragent.useragent.js.map +0 -9
  167. package/dist/cljs-runtime/iris_layout.components.entity_card_group.js +0 -202
  168. package/dist/cljs-runtime/iris_layout.components.entity_card_group.js.map +0 -1
  169. package/dist/cljs-runtime/iris_layout.components.entity_tile.js +0 -327
  170. package/dist/cljs-runtime/iris_layout.components.entity_tile.js.map +0 -1
  171. package/dist/cljs-runtime/iris_layout.components.entity_tile_group.js +0 -33
  172. package/dist/cljs-runtime/iris_layout.components.entity_tile_group.js.map +0 -1
  173. package/dist/cljs-runtime/iris_layout.components.resizer.js +0 -91
  174. package/dist/cljs-runtime/iris_layout.components.resizer.js.map +0 -1
  175. package/dist/cljs-runtime/iris_layout.components.touch_drag.js +0 -385
  176. package/dist/cljs-runtime/iris_layout.components.touch_drag.js.map +0 -1
  177. package/dist/cljs-runtime/iris_layout.core.js +0 -876
  178. package/dist/cljs-runtime/iris_layout.core.js.map +0 -1
  179. package/dist/cljs-runtime/iris_layout.layout.js +0 -328
  180. package/dist/cljs-runtime/iris_layout.layout.js.map +0 -1
  181. package/dist/cljs-runtime/reagent.core.js +0 -993
  182. package/dist/cljs-runtime/reagent.core.js.map +0 -1
  183. package/dist/cljs-runtime/reagent.debug.js +0 -75
  184. package/dist/cljs-runtime/reagent.debug.js.map +0 -1
  185. package/dist/cljs-runtime/reagent.impl.batching.js +0 -270
  186. package/dist/cljs-runtime/reagent.impl.batching.js.map +0 -1
  187. package/dist/cljs-runtime/reagent.impl.component.js +0 -758
  188. package/dist/cljs-runtime/reagent.impl.component.js.map +0 -1
  189. package/dist/cljs-runtime/reagent.impl.input.js +0 -175
  190. package/dist/cljs-runtime/reagent.impl.input.js.map +0 -1
  191. package/dist/cljs-runtime/reagent.impl.protocols.js +0 -99
  192. package/dist/cljs-runtime/reagent.impl.protocols.js.map +0 -1
  193. package/dist/cljs-runtime/reagent.impl.template.js +0 -660
  194. package/dist/cljs-runtime/reagent.impl.template.js.map +0 -1
  195. package/dist/cljs-runtime/reagent.impl.util.js +0 -748
  196. package/dist/cljs-runtime/reagent.impl.util.js.map +0 -1
  197. package/dist/cljs-runtime/reagent.ratom.js +0 -1668
  198. package/dist/cljs-runtime/reagent.ratom.js.map +0 -1
  199. package/dist/cljs-runtime/shadow.esm.esm_import$react.js +0 -5
  200. package/dist/cljs-runtime/shadow.module.iris-layout.append.js +0 -2
  201. package/dist/cljs-runtime/shadow.module.iris-layout.prepend.js +0 -2
@@ -1,659 +0,0 @@
1
- import "./cljs_env.js";
2
- import "./goog.asserts.asserts.js";
3
- goog.loadModule(function(exports) {
4
- function peek(array) {
5
- return array[array.length - 1];
6
- }
7
- function forEachRight(arr, f, opt_obj) {
8
- const l = arr.length;
9
- const arr2 = typeof arr === "string" ? arr.split("") : arr;
10
- for (let i = l - 1; i >= 0; --i) {
11
- if (i in arr2) {
12
- f.call(opt_obj, arr2[i], i, arr);
13
- }
14
- }
15
- }
16
- function count(arr, f, opt_obj) {
17
- let count = 0;
18
- forEach(arr, function(element, index, arr) {
19
- if (f.call(opt_obj, element, index, arr)) {
20
- ++count;
21
- }
22
- }, opt_obj);
23
- return count;
24
- }
25
- function find(arr, f, opt_obj) {
26
- const i = findIndex(arr, f, opt_obj);
27
- return i < 0 ? null : typeof arr === "string" ? arr.charAt(i) : arr[i];
28
- }
29
- function findIndex(arr, f, opt_obj) {
30
- const l = arr.length;
31
- const arr2 = typeof arr === "string" ? arr.split("") : arr;
32
- for (let i = 0; i < l; i++) {
33
- if (i in arr2 && f.call(opt_obj, arr2[i], i, arr)) {
34
- return i;
35
- }
36
- }
37
- return -1;
38
- }
39
- function findRight(arr, f, opt_obj) {
40
- const i = findIndexRight(arr, f, opt_obj);
41
- return i < 0 ? null : typeof arr === "string" ? arr.charAt(i) : arr[i];
42
- }
43
- function findIndexRight(arr, f, opt_obj) {
44
- const l = arr.length;
45
- const arr2 = typeof arr === "string" ? arr.split("") : arr;
46
- for (let i = l - 1; i >= 0; i--) {
47
- if (i in arr2 && f.call(opt_obj, arr2[i], i, arr)) {
48
- return i;
49
- }
50
- }
51
- return -1;
52
- }
53
- function contains(arr, obj) {
54
- return indexOf(arr, obj) >= 0;
55
- }
56
- function isEmpty(arr) {
57
- return arr.length == 0;
58
- }
59
- function clear(arr) {
60
- if (!Array.isArray(arr)) {
61
- for (let i = arr.length - 1; i >= 0; i--) {
62
- delete arr[i];
63
- }
64
- }
65
- arr.length = 0;
66
- }
67
- function insert(arr, obj) {
68
- if (!contains(arr, obj)) {
69
- arr.push(obj);
70
- }
71
- }
72
- function insertAt(arr, obj, opt_i) {
73
- splice(arr, opt_i, 0, obj);
74
- }
75
- function insertArrayAt(arr, elementsToAdd, opt_i) {
76
- goog.partial(splice, arr, opt_i, 0).apply(null, elementsToAdd);
77
- }
78
- function insertBefore(arr, obj, opt_obj2) {
79
- let i;
80
- if (arguments.length == 2 || (i = indexOf(arr, opt_obj2)) < 0) {
81
- arr.push(obj);
82
- } else {
83
- insertAt(arr, obj, i);
84
- }
85
- }
86
- function remove(arr, obj) {
87
- const i = indexOf(arr, obj);
88
- let rv;
89
- if (rv = i >= 0) {
90
- removeAt(arr, i);
91
- }
92
- return rv;
93
- }
94
- function removeLast(arr, obj) {
95
- const i = lastIndexOf(arr, obj);
96
- if (i >= 0) {
97
- removeAt(arr, i);
98
- return true;
99
- }
100
- return false;
101
- }
102
- function removeAt(arr, i) {
103
- asserts.assert(arr.length != null);
104
- return Array.prototype.splice.call(arr, i, 1).length == 1;
105
- }
106
- function removeIf(arr, f, opt_obj) {
107
- const i = findIndex(arr, f, opt_obj);
108
- if (i >= 0) {
109
- removeAt(arr, i);
110
- return true;
111
- }
112
- return false;
113
- }
114
- function removeAllIf(arr, f, opt_obj) {
115
- let removedCount = 0;
116
- forEachRight(arr, function(val, index) {
117
- if (f.call(opt_obj, val, index, arr)) {
118
- if (removeAt(arr, index)) {
119
- removedCount++;
120
- }
121
- }
122
- });
123
- return removedCount;
124
- }
125
- function concat(var_args) {
126
- return Array.prototype.concat.apply([], arguments);
127
- }
128
- function join(var_args) {
129
- return Array.prototype.concat.apply([], arguments);
130
- }
131
- function toArray(object) {
132
- const length = object.length;
133
- if (length > 0) {
134
- const rv = new Array(length);
135
- for (let i = 0; i < length; i++) {
136
- rv[i] = object[i];
137
- }
138
- return rv;
139
- }
140
- return [];
141
- }
142
- function extend(arr1, var_args) {
143
- for (let i = 1; i < arguments.length; i++) {
144
- const arr2 = arguments[i];
145
- if (goog.isArrayLike(arr2)) {
146
- const len1 = arr1.length || 0;
147
- const len2 = arr2.length || 0;
148
- arr1.length = len1 + len2;
149
- for (let j = 0; j < len2; j++) {
150
- arr1[len1 + j] = arr2[j];
151
- }
152
- } else {
153
- arr1.push(arr2);
154
- }
155
- }
156
- }
157
- function splice(arr, index, howMany, var_args) {
158
- asserts.assert(arr.length != null);
159
- return Array.prototype.splice.apply(arr, slice(arguments, 1));
160
- }
161
- function slice(arr, start, opt_end) {
162
- asserts.assert(arr.length != null);
163
- if (arguments.length <= 2) {
164
- return Array.prototype.slice.call(arr, start);
165
- } else {
166
- return Array.prototype.slice.call(arr, start, opt_end);
167
- }
168
- }
169
- function removeDuplicates(arr, opt_rv, opt_hashFn) {
170
- const returnArray = opt_rv || arr;
171
- const defaultHashFn = function(item) {
172
- return goog.isObject(item) ? "o" + goog.getUid(item) : (typeof item).charAt(0) + item;
173
- };
174
- const hashFn = opt_hashFn || defaultHashFn;
175
- let cursorInsert = 0;
176
- let cursorRead = 0;
177
- const seen = {};
178
- for (; cursorRead < arr.length;) {
179
- const current = arr[cursorRead++];
180
- const key = hashFn(current);
181
- if (!Object.prototype.hasOwnProperty.call(seen, key)) {
182
- seen[key] = true;
183
- returnArray[cursorInsert++] = current;
184
- }
185
- }
186
- returnArray.length = cursorInsert;
187
- }
188
- function binarySearch(arr, target, opt_compareFn) {
189
- return binarySearch_(arr, opt_compareFn || defaultCompare, false, target);
190
- }
191
- function binarySelect(arr, evaluator, opt_obj) {
192
- return binarySearch_(arr, evaluator, true, undefined, opt_obj);
193
- }
194
- function binarySearch_(arr, compareFn, isEvaluator, opt_target, opt_selfObj) {
195
- let left = 0;
196
- let right = arr.length;
197
- let found;
198
- for (; left < right;) {
199
- const middle = left + (right - left >>> 1);
200
- let compareResult;
201
- if (isEvaluator) {
202
- compareResult = compareFn.call(opt_selfObj, arr[middle], middle, arr);
203
- } else {
204
- compareResult = compareFn(opt_target, arr[middle]);
205
- }
206
- if (compareResult > 0) {
207
- left = middle + 1;
208
- } else {
209
- right = middle;
210
- found = !compareResult;
211
- }
212
- }
213
- return found ? left : -left - 1;
214
- }
215
- function sort(arr, opt_compareFn) {
216
- arr.sort(opt_compareFn || defaultCompare);
217
- }
218
- function stableSort(arr, opt_compareFn) {
219
- function stableCompareFn(obj1, obj2) {
220
- return valueCompareFn(obj1.value, obj2.value) || obj1.index - obj2.index;
221
- }
222
- const compArr = new Array(arr.length);
223
- for (let i = 0; i < arr.length; i++) {
224
- compArr[i] = {index:i, value:arr[i]};
225
- }
226
- const valueCompareFn = opt_compareFn || defaultCompare;
227
- sort(compArr, stableCompareFn);
228
- for (let i = 0; i < arr.length; i++) {
229
- arr[i] = compArr[i].value;
230
- }
231
- }
232
- function sortByKey(arr, keyFn, opt_compareFn) {
233
- const keyCompareFn = opt_compareFn || defaultCompare;
234
- sort(arr, function(a, b) {
235
- return keyCompareFn(keyFn(a), keyFn(b));
236
- });
237
- }
238
- function sortObjectsByKey(arr, key, opt_compareFn) {
239
- sortByKey(arr, function(obj) {
240
- return obj[key];
241
- }, opt_compareFn);
242
- }
243
- function isSorted(arr, opt_compareFn, opt_strict) {
244
- const compare = opt_compareFn || defaultCompare;
245
- for (let i = 1; i < arr.length; i++) {
246
- const compareResult = compare(arr[i - 1], arr[i]);
247
- if (compareResult > 0 || compareResult == 0 && opt_strict) {
248
- return false;
249
- }
250
- }
251
- return true;
252
- }
253
- function equals(arr1, arr2, opt_equalsFn) {
254
- if (!goog.isArrayLike(arr1) || !goog.isArrayLike(arr2) || arr1.length != arr2.length) {
255
- return false;
256
- }
257
- const l = arr1.length;
258
- const equalsFn = opt_equalsFn || defaultCompareEquality;
259
- for (let i = 0; i < l; i++) {
260
- if (!equalsFn(arr1[i], arr2[i])) {
261
- return false;
262
- }
263
- }
264
- return true;
265
- }
266
- function compare3(arr1, arr2, opt_compareFn) {
267
- const compare = opt_compareFn || defaultCompare;
268
- const l = Math.min(arr1.length, arr2.length);
269
- for (let i = 0; i < l; i++) {
270
- const result = compare(arr1[i], arr2[i]);
271
- if (result != 0) {
272
- return result;
273
- }
274
- }
275
- return defaultCompare(arr1.length, arr2.length);
276
- }
277
- function defaultCompare(a, b) {
278
- return a > b ? 1 : a < b ? -1 : 0;
279
- }
280
- function inverseDefaultCompare(a, b) {
281
- return -defaultCompare(a, b);
282
- }
283
- function defaultCompareEquality(a, b) {
284
- return a === b;
285
- }
286
- function binaryInsert(array, value, opt_compareFn) {
287
- const index = binarySearch(array, value, opt_compareFn);
288
- if (index < 0) {
289
- insertAt(array, value, -(index + 1));
290
- return true;
291
- }
292
- return false;
293
- }
294
- function binaryRemove(array, value, opt_compareFn) {
295
- const index = binarySearch(array, value, opt_compareFn);
296
- return index >= 0 ? removeAt(array, index) : false;
297
- }
298
- function bucket(array, sorter, opt_obj) {
299
- const buckets = {};
300
- for (let i = 0; i < array.length; i++) {
301
- const value = array[i];
302
- const key = sorter.call(opt_obj, value, i, array);
303
- if (key !== undefined) {
304
- const bucket = buckets[key] || (buckets[key] = []);
305
- bucket.push(value);
306
- }
307
- }
308
- return buckets;
309
- }
310
- function bucketToMap(array, sorter) {
311
- const buckets = new Map();
312
- for (let i = 0; i < array.length; i++) {
313
- const value = array[i];
314
- const key = sorter(value, i, array);
315
- if (key !== undefined) {
316
- let bucket = buckets.get(key);
317
- if (!bucket) {
318
- bucket = [];
319
- buckets.set(key, bucket);
320
- }
321
- bucket.push(value);
322
- }
323
- }
324
- return buckets;
325
- }
326
- function toObject(arr, keyFunc, opt_obj) {
327
- const ret = {};
328
- forEach(arr, function(element, index) {
329
- ret[keyFunc.call(opt_obj, element, index, arr)] = element;
330
- });
331
- return ret;
332
- }
333
- function toMap(arr, keyFunc) {
334
- const map = new Map();
335
- for (let i = 0; i < arr.length; i++) {
336
- const element = arr[i];
337
- map.set(keyFunc(element, i, arr), element);
338
- }
339
- return map;
340
- }
341
- function range(startOrEnd, opt_end, opt_step) {
342
- const array = [];
343
- let start = 0;
344
- let end = startOrEnd;
345
- const step = opt_step || 1;
346
- if (opt_end !== undefined) {
347
- start = startOrEnd;
348
- end = opt_end;
349
- }
350
- if (step * (end - start) < 0) {
351
- return [];
352
- }
353
- if (step > 0) {
354
- for (let i = start; i < end; i = i + step) {
355
- array.push(i);
356
- }
357
- } else {
358
- for (let i = start; i > end; i = i + step) {
359
- array.push(i);
360
- }
361
- }
362
- return array;
363
- }
364
- function repeat(value, n) {
365
- const array = [];
366
- for (let i = 0; i < n; i++) {
367
- array[i] = value;
368
- }
369
- return array;
370
- }
371
- function flatten(var_args) {
372
- const CHUNK_SIZE = 8192;
373
- const result = [];
374
- for (let i = 0; i < arguments.length; i++) {
375
- const element = arguments[i];
376
- if (Array.isArray(element)) {
377
- for (let c = 0; c < element.length; c = c + CHUNK_SIZE) {
378
- const chunk = slice(element, c, c + CHUNK_SIZE);
379
- const recurseResult = flatten.apply(null, chunk);
380
- for (let r = 0; r < recurseResult.length; r++) {
381
- result.push(recurseResult[r]);
382
- }
383
- }
384
- } else {
385
- result.push(element);
386
- }
387
- }
388
- return result;
389
- }
390
- function rotate(array, n) {
391
- asserts.assert(array.length != null);
392
- if (array.length) {
393
- n = n % array.length;
394
- if (n > 0) {
395
- Array.prototype.unshift.apply(array, array.splice(-n, n));
396
- } else if (n < 0) {
397
- Array.prototype.push.apply(array, array.splice(0, -n));
398
- }
399
- }
400
- return array;
401
- }
402
- function moveItem(arr, fromIndex, toIndex) {
403
- asserts.assert(fromIndex >= 0 && fromIndex < arr.length);
404
- asserts.assert(toIndex >= 0 && toIndex < arr.length);
405
- const removedItems = Array.prototype.splice.call(arr, fromIndex, 1);
406
- Array.prototype.splice.call(arr, toIndex, 0, removedItems[0]);
407
- }
408
- function zip(var_args) {
409
- if (!arguments.length) {
410
- return [];
411
- }
412
- const result = [];
413
- let minLen = arguments[0].length;
414
- for (let i = 1; i < arguments.length; i++) {
415
- if (arguments[i].length < minLen) {
416
- minLen = arguments[i].length;
417
- }
418
- }
419
- for (let i = 0; i < minLen; i++) {
420
- const value = [];
421
- for (let j = 0; j < arguments.length; j++) {
422
- value.push(arguments[j][i]);
423
- }
424
- result.push(value);
425
- }
426
- return result;
427
- }
428
- function shuffle(arr, opt_randFn) {
429
- const randFn = opt_randFn || Math.random;
430
- for (let i = arr.length - 1; i > 0; i--) {
431
- const j = Math.floor(randFn() * (i + 1));
432
- const tmp = arr[i];
433
- arr[i] = arr[j];
434
- arr[j] = tmp;
435
- }
436
- }
437
- function copyByIndex(arr, index_arr) {
438
- const result = [];
439
- forEach(index_arr, function(index) {
440
- result.push(arr[index]);
441
- });
442
- return result;
443
- }
444
- function concatMap(arr, f, opt_obj) {
445
- return concat.apply([], map(arr, f, opt_obj));
446
- }
447
- "use strict";
448
- goog.module("goog.array");
449
- goog.module.declareLegacyNamespace();
450
- const asserts = goog.require("goog.asserts");
451
- goog.NATIVE_ARRAY_PROTOTYPES = goog.define("goog.NATIVE_ARRAY_PROTOTYPES", goog.TRUSTED_SITE);
452
- const ASSUME_NATIVE_FUNCTIONS = goog.define("goog.array.ASSUME_NATIVE_FUNCTIONS", goog.FEATURESET_YEAR > 2012);
453
- exports.ASSUME_NATIVE_FUNCTIONS = ASSUME_NATIVE_FUNCTIONS;
454
- exports.peek = peek;
455
- exports.last = peek;
456
- const indexOf = goog.NATIVE_ARRAY_PROTOTYPES && (ASSUME_NATIVE_FUNCTIONS || Array.prototype.indexOf) ? function(arr, obj, opt_fromIndex) {
457
- asserts.assert(arr.length != null);
458
- return Array.prototype.indexOf.call(arr, obj, opt_fromIndex);
459
- } : function(arr, obj, opt_fromIndex) {
460
- const fromIndex = opt_fromIndex == null ? 0 : opt_fromIndex < 0 ? Math.max(0, arr.length + opt_fromIndex) : opt_fromIndex;
461
- if (typeof arr === "string") {
462
- if (typeof obj !== "string" || obj.length != 1) {
463
- return -1;
464
- }
465
- return arr.indexOf(obj, fromIndex);
466
- }
467
- for (let i = fromIndex; i < arr.length; i++) {
468
- if (i in arr && arr[i] === obj) {
469
- return i;
470
- }
471
- }
472
- return -1;
473
- };
474
- exports.indexOf = indexOf;
475
- const lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && (ASSUME_NATIVE_FUNCTIONS || Array.prototype.lastIndexOf) ? function(arr, obj, opt_fromIndex) {
476
- asserts.assert(arr.length != null);
477
- const fromIndex = opt_fromIndex == null ? arr.length - 1 : opt_fromIndex;
478
- return Array.prototype.lastIndexOf.call(arr, obj, fromIndex);
479
- } : function(arr, obj, opt_fromIndex) {
480
- let fromIndex = opt_fromIndex == null ? arr.length - 1 : opt_fromIndex;
481
- if (fromIndex < 0) {
482
- fromIndex = Math.max(0, arr.length + fromIndex);
483
- }
484
- if (typeof arr === "string") {
485
- if (typeof obj !== "string" || obj.length != 1) {
486
- return -1;
487
- }
488
- return arr.lastIndexOf(obj, fromIndex);
489
- }
490
- for (let i = fromIndex; i >= 0; i--) {
491
- if (i in arr && arr[i] === obj) {
492
- return i;
493
- }
494
- }
495
- return -1;
496
- };
497
- exports.lastIndexOf = lastIndexOf;
498
- const forEach = goog.NATIVE_ARRAY_PROTOTYPES && (ASSUME_NATIVE_FUNCTIONS || Array.prototype.forEach) ? function(arr, f, opt_obj) {
499
- asserts.assert(arr.length != null);
500
- Array.prototype.forEach.call(arr, f, opt_obj);
501
- } : function(arr, f, opt_obj) {
502
- const l = arr.length;
503
- const arr2 = typeof arr === "string" ? arr.split("") : arr;
504
- for (let i = 0; i < l; i++) {
505
- if (i in arr2) {
506
- f.call(opt_obj, arr2[i], i, arr);
507
- }
508
- }
509
- };
510
- exports.forEach = forEach;
511
- exports.forEachRight = forEachRight;
512
- const filter = goog.NATIVE_ARRAY_PROTOTYPES && (ASSUME_NATIVE_FUNCTIONS || Array.prototype.filter) ? function(arr, f, opt_obj) {
513
- asserts.assert(arr.length != null);
514
- return Array.prototype.filter.call(arr, f, opt_obj);
515
- } : function(arr, f, opt_obj) {
516
- const l = arr.length;
517
- const res = [];
518
- let resLength = 0;
519
- const arr2 = typeof arr === "string" ? arr.split("") : arr;
520
- for (let i = 0; i < l; i++) {
521
- if (i in arr2) {
522
- const val = arr2[i];
523
- if (f.call(opt_obj, val, i, arr)) {
524
- res[resLength++] = val;
525
- }
526
- }
527
- }
528
- return res;
529
- };
530
- exports.filter = filter;
531
- const map = goog.NATIVE_ARRAY_PROTOTYPES && (ASSUME_NATIVE_FUNCTIONS || Array.prototype.map) ? function(arr, f, opt_obj) {
532
- asserts.assert(arr.length != null);
533
- return Array.prototype.map.call(arr, f, opt_obj);
534
- } : function(arr, f, opt_obj) {
535
- const l = arr.length;
536
- const res = new Array(l);
537
- const arr2 = typeof arr === "string" ? arr.split("") : arr;
538
- for (let i = 0; i < l; i++) {
539
- if (i in arr2) {
540
- res[i] = f.call(opt_obj, arr2[i], i, arr);
541
- }
542
- }
543
- return res;
544
- };
545
- exports.map = map;
546
- const reduce = goog.NATIVE_ARRAY_PROTOTYPES && (ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduce) ? function(arr, f, val, opt_obj) {
547
- asserts.assert(arr.length != null);
548
- if (opt_obj) {
549
- f = goog.bind(f, opt_obj);
550
- }
551
- return Array.prototype.reduce.call(arr, f, val);
552
- } : function(arr, f, val, opt_obj) {
553
- let rval = val;
554
- forEach(arr, function(val, index) {
555
- rval = f.call(opt_obj, rval, val, index, arr);
556
- });
557
- return rval;
558
- };
559
- exports.reduce = reduce;
560
- const reduceRight = goog.NATIVE_ARRAY_PROTOTYPES && (ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduceRight) ? function(arr, f, val, opt_obj) {
561
- asserts.assert(arr.length != null);
562
- asserts.assert(f != null);
563
- if (opt_obj) {
564
- f = goog.bind(f, opt_obj);
565
- }
566
- return Array.prototype.reduceRight.call(arr, f, val);
567
- } : function(arr, f, val, opt_obj) {
568
- let rval = val;
569
- forEachRight(arr, function(val, index) {
570
- rval = f.call(opt_obj, rval, val, index, arr);
571
- });
572
- return rval;
573
- };
574
- exports.reduceRight = reduceRight;
575
- const some = goog.NATIVE_ARRAY_PROTOTYPES && (ASSUME_NATIVE_FUNCTIONS || Array.prototype.some) ? function(arr, f, opt_obj) {
576
- asserts.assert(arr.length != null);
577
- return Array.prototype.some.call(arr, f, opt_obj);
578
- } : function(arr, f, opt_obj) {
579
- const l = arr.length;
580
- const arr2 = typeof arr === "string" ? arr.split("") : arr;
581
- for (let i = 0; i < l; i++) {
582
- if (i in arr2 && f.call(opt_obj, arr2[i], i, arr)) {
583
- return true;
584
- }
585
- }
586
- return false;
587
- };
588
- exports.some = some;
589
- const every = goog.NATIVE_ARRAY_PROTOTYPES && (ASSUME_NATIVE_FUNCTIONS || Array.prototype.every) ? function(arr, f, opt_obj) {
590
- asserts.assert(arr.length != null);
591
- return Array.prototype.every.call(arr, f, opt_obj);
592
- } : function(arr, f, opt_obj) {
593
- const l = arr.length;
594
- const arr2 = typeof arr === "string" ? arr.split("") : arr;
595
- for (let i = 0; i < l; i++) {
596
- if (i in arr2 && !f.call(opt_obj, arr2[i], i, arr)) {
597
- return false;
598
- }
599
- }
600
- return true;
601
- };
602
- exports.every = every;
603
- exports.count = count;
604
- exports.find = find;
605
- exports.findIndex = findIndex;
606
- exports.findRight = findRight;
607
- exports.findIndexRight = findIndexRight;
608
- exports.contains = contains;
609
- exports.isEmpty = isEmpty;
610
- exports.clear = clear;
611
- exports.insert = insert;
612
- exports.insertAt = insertAt;
613
- exports.insertArrayAt = insertArrayAt;
614
- exports.insertBefore = insertBefore;
615
- exports.remove = remove;
616
- exports.removeLast = removeLast;
617
- exports.removeAt = removeAt;
618
- exports.removeIf = removeIf;
619
- exports.removeAllIf = removeAllIf;
620
- exports.concat = concat;
621
- exports.join = join;
622
- exports.toArray = toArray;
623
- const clone = toArray;
624
- exports.clone = clone;
625
- exports.extend = extend;
626
- exports.splice = splice;
627
- exports.slice = slice;
628
- exports.removeDuplicates = removeDuplicates;
629
- exports.binarySearch = binarySearch;
630
- exports.binarySelect = binarySelect;
631
- exports.sort = sort;
632
- exports.stableSort = stableSort;
633
- exports.sortByKey = sortByKey;
634
- exports.sortObjectsByKey = sortObjectsByKey;
635
- exports.isSorted = isSorted;
636
- exports.equals = equals;
637
- exports.compare3 = compare3;
638
- exports.defaultCompare = defaultCompare;
639
- exports.inverseDefaultCompare = inverseDefaultCompare;
640
- exports.defaultCompareEquality = defaultCompareEquality;
641
- exports.binaryInsert = binaryInsert;
642
- exports.binaryRemove = binaryRemove;
643
- exports.bucket = bucket;
644
- exports.bucketToMap = bucketToMap;
645
- exports.toObject = toObject;
646
- exports.toMap = toMap;
647
- exports.range = range;
648
- exports.repeat = repeat;
649
- exports.flatten = flatten;
650
- exports.rotate = rotate;
651
- exports.moveItem = moveItem;
652
- exports.zip = zip;
653
- exports.shuffle = shuffle;
654
- exports.copyByIndex = copyByIndex;
655
- exports.concatMap = concatMap;
656
- return exports;
657
- });
658
-
659
- //# sourceMappingURL=goog.array.array.js.map