@p4ulcristian/iris-layout 0.2.0 → 0.2.2

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/cljs-runtime/cljs.core.js +38746 -0
  2. package/dist/cljs-runtime/cljs.core.js.map +1 -0
  3. package/dist/cljs-runtime/cljs.pprint.js +8400 -0
  4. package/dist/cljs-runtime/cljs.pprint.js.map +1 -0
  5. package/dist/cljs-runtime/cljs.stacktrace.js +561 -0
  6. package/dist/cljs-runtime/cljs.stacktrace.js.map +1 -0
  7. package/dist/cljs-runtime/cljs_env.js +1286 -0
  8. package/dist/cljs-runtime/clojure.data.js +295 -0
  9. package/dist/cljs-runtime/clojure.data.js.map +1 -0
  10. package/dist/cljs-runtime/clojure.set.js +382 -0
  11. package/dist/cljs-runtime/clojure.set.js.map +1 -0
  12. package/dist/cljs-runtime/clojure.string.js +480 -0
  13. package/dist/cljs-runtime/clojure.string.js.map +1 -0
  14. package/dist/cljs-runtime/clojure.walk.js +132 -0
  15. package/dist/cljs-runtime/clojure.walk.js.map +1 -0
  16. package/dist/cljs-runtime/devtools.async.js +90 -0
  17. package/dist/cljs-runtime/devtools.async.js.map +1 -0
  18. package/dist/cljs-runtime/devtools.context.js +11 -0
  19. package/dist/cljs-runtime/devtools.context.js.map +1 -0
  20. package/dist/cljs-runtime/devtools.core.js +175 -0
  21. package/dist/cljs-runtime/devtools.core.js.map +1 -0
  22. package/dist/cljs-runtime/devtools.defaults.js +20 -0
  23. package/dist/cljs-runtime/devtools.defaults.js.map +1 -0
  24. package/dist/cljs-runtime/devtools.format.js +631 -0
  25. package/dist/cljs-runtime/devtools.format.js.map +1 -0
  26. package/dist/cljs-runtime/devtools.formatters.budgeting.js +182 -0
  27. package/dist/cljs-runtime/devtools.formatters.budgeting.js.map +1 -0
  28. package/dist/cljs-runtime/devtools.formatters.core.js +220 -0
  29. package/dist/cljs-runtime/devtools.formatters.core.js.map +1 -0
  30. package/dist/cljs-runtime/devtools.formatters.helpers.js +228 -0
  31. package/dist/cljs-runtime/devtools.formatters.helpers.js.map +1 -0
  32. package/dist/cljs-runtime/devtools.formatters.js +261 -0
  33. package/dist/cljs-runtime/devtools.formatters.js.map +1 -0
  34. package/dist/cljs-runtime/devtools.formatters.markup.js +1174 -0
  35. package/dist/cljs-runtime/devtools.formatters.markup.js.map +1 -0
  36. package/dist/cljs-runtime/devtools.formatters.printing.js +313 -0
  37. package/dist/cljs-runtime/devtools.formatters.printing.js.map +1 -0
  38. package/dist/cljs-runtime/devtools.formatters.state.js +325 -0
  39. package/dist/cljs-runtime/devtools.formatters.state.js.map +1 -0
  40. package/dist/cljs-runtime/devtools.formatters.templating.js +666 -0
  41. package/dist/cljs-runtime/devtools.formatters.templating.js.map +1 -0
  42. package/dist/cljs-runtime/devtools.hints.js +193 -0
  43. package/dist/cljs-runtime/devtools.hints.js.map +1 -0
  44. package/dist/cljs-runtime/devtools.munging.js +1058 -0
  45. package/dist/cljs-runtime/devtools.munging.js.map +1 -0
  46. package/dist/cljs-runtime/devtools.prefs.js +87 -0
  47. package/dist/cljs-runtime/devtools.prefs.js.map +1 -0
  48. package/dist/cljs-runtime/devtools.preload.js +11 -0
  49. package/dist/cljs-runtime/devtools.preload.js.map +1 -0
  50. package/dist/cljs-runtime/devtools.protocols.js +98 -0
  51. package/dist/cljs-runtime/devtools.protocols.js.map +1 -0
  52. package/dist/cljs-runtime/devtools.reporter.js +81 -0
  53. package/dist/cljs-runtime/devtools.reporter.js.map +1 -0
  54. package/dist/cljs-runtime/devtools.toolbox.js +141 -0
  55. package/dist/cljs-runtime/devtools.toolbox.js.map +1 -0
  56. package/dist/cljs-runtime/devtools.util.js +517 -0
  57. package/dist/cljs-runtime/devtools.util.js.map +1 -0
  58. package/dist/cljs-runtime/devtools.version.js +9 -0
  59. package/dist/cljs-runtime/devtools.version.js.map +1 -0
  60. package/dist/cljs-runtime/goog.array.array.js +659 -0
  61. package/dist/cljs-runtime/goog.array.array.js.map +9 -0
  62. package/dist/cljs-runtime/goog.asserts.asserts.js +133 -0
  63. package/dist/cljs-runtime/goog.asserts.asserts.js.map +9 -0
  64. package/dist/cljs-runtime/goog.asserts.dom.js +90 -0
  65. package/dist/cljs-runtime/goog.asserts.dom.js.map +9 -0
  66. package/dist/cljs-runtime/goog.async.nexttick.js +93 -0
  67. package/dist/cljs-runtime/goog.async.nexttick.js.map +9 -0
  68. package/dist/cljs-runtime/goog.base.js +1261 -0
  69. package/dist/cljs-runtime/goog.base.js.map +9 -0
  70. package/dist/cljs-runtime/goog.collections.maps.js +82 -0
  71. package/dist/cljs-runtime/goog.collections.maps.js.map +9 -0
  72. package/dist/cljs-runtime/goog.debug.entrypointregistry.js +44 -0
  73. package/dist/cljs-runtime/goog.debug.entrypointregistry.js.map +9 -0
  74. package/dist/cljs-runtime/goog.debug.error.js +30 -0
  75. package/dist/cljs-runtime/goog.debug.error.js.map +9 -0
  76. package/dist/cljs-runtime/goog.dom.asserts.js +40 -0
  77. package/dist/cljs-runtime/goog.dom.asserts.js.map +9 -0
  78. package/dist/cljs-runtime/goog.dom.browserfeature.js +21 -0
  79. package/dist/cljs-runtime/goog.dom.browserfeature.js.map +9 -0
  80. package/dist/cljs-runtime/goog.dom.dom.js +1087 -0
  81. package/dist/cljs-runtime/goog.dom.dom.js.map +9 -0
  82. package/dist/cljs-runtime/goog.dom.element.js +69 -0
  83. package/dist/cljs-runtime/goog.dom.element.js.map +9 -0
  84. package/dist/cljs-runtime/goog.dom.htmlelement.js +7 -0
  85. package/dist/cljs-runtime/goog.dom.htmlelement.js.map +9 -0
  86. package/dist/cljs-runtime/goog.dom.nodetype.js +6 -0
  87. package/dist/cljs-runtime/goog.dom.nodetype.js.map +9 -0
  88. package/dist/cljs-runtime/goog.dom.safe.js +277 -0
  89. package/dist/cljs-runtime/goog.dom.safe.js.map +9 -0
  90. package/dist/cljs-runtime/goog.dom.tagname.js +147 -0
  91. package/dist/cljs-runtime/goog.dom.tagname.js.map +9 -0
  92. package/dist/cljs-runtime/goog.dom.tags.js +10 -0
  93. package/dist/cljs-runtime/goog.dom.tags.js.map +9 -0
  94. package/dist/cljs-runtime/goog.flags.flags.js +12 -0
  95. package/dist/cljs-runtime/goog.flags.flags.js.map +9 -0
  96. package/dist/cljs-runtime/goog.fs.blob.js +38 -0
  97. package/dist/cljs-runtime/goog.fs.blob.js.map +9 -0
  98. package/dist/cljs-runtime/goog.fs.url.js +37 -0
  99. package/dist/cljs-runtime/goog.fs.url.js.map +9 -0
  100. package/dist/cljs-runtime/goog.functions.functions.js +211 -0
  101. package/dist/cljs-runtime/goog.functions.functions.js.map +9 -0
  102. package/dist/cljs-runtime/goog.html.safehtml.js +321 -0
  103. package/dist/cljs-runtime/goog.html.safehtml.js.map +9 -0
  104. package/dist/cljs-runtime/goog.html.safescript.js +65 -0
  105. package/dist/cljs-runtime/goog.html.safescript.js.map +9 -0
  106. package/dist/cljs-runtime/goog.html.safestyle.js +175 -0
  107. package/dist/cljs-runtime/goog.html.safestyle.js.map +9 -0
  108. package/dist/cljs-runtime/goog.html.safestylesheet.js +99 -0
  109. package/dist/cljs-runtime/goog.html.safestylesheet.js.map +9 -0
  110. package/dist/cljs-runtime/goog.html.safeurl.js +231 -0
  111. package/dist/cljs-runtime/goog.html.safeurl.js.map +9 -0
  112. package/dist/cljs-runtime/goog.html.trustedresourceurl.js +123 -0
  113. package/dist/cljs-runtime/goog.html.trustedresourceurl.js.map +9 -0
  114. package/dist/cljs-runtime/goog.html.trustedtypes.js +16 -0
  115. package/dist/cljs-runtime/goog.html.trustedtypes.js.map +9 -0
  116. package/dist/cljs-runtime/goog.html.uncheckedconversions.js +52 -0
  117. package/dist/cljs-runtime/goog.html.uncheckedconversions.js.map +9 -0
  118. package/dist/cljs-runtime/goog.labs.useragent.browser.js +352 -0
  119. package/dist/cljs-runtime/goog.labs.useragent.browser.js.map +9 -0
  120. package/dist/cljs-runtime/goog.labs.useragent.engine.js +73 -0
  121. package/dist/cljs-runtime/goog.labs.useragent.engine.js.map +9 -0
  122. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropydata.js +14 -0
  123. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropydata.js.map +9 -0
  124. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropyvalue.js +74 -0
  125. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropyvalue.js.map +9 -0
  126. package/dist/cljs-runtime/goog.labs.useragent.platform.js +147 -0
  127. package/dist/cljs-runtime/goog.labs.useragent.platform.js.map +9 -0
  128. package/dist/cljs-runtime/goog.labs.useragent.useragent.js +21 -0
  129. package/dist/cljs-runtime/goog.labs.useragent.useragent.js.map +9 -0
  130. package/dist/cljs-runtime/goog.labs.useragent.util.js +81 -0
  131. package/dist/cljs-runtime/goog.labs.useragent.util.js.map +9 -0
  132. package/dist/cljs-runtime/goog.math.coordinate.js +97 -0
  133. package/dist/cljs-runtime/goog.math.coordinate.js.map +9 -0
  134. package/dist/cljs-runtime/goog.math.integer.js +445 -0
  135. package/dist/cljs-runtime/goog.math.integer.js.map +9 -0
  136. package/dist/cljs-runtime/goog.math.long.js +437 -0
  137. package/dist/cljs-runtime/goog.math.long.js.map +9 -0
  138. package/dist/cljs-runtime/goog.math.math.js +158 -0
  139. package/dist/cljs-runtime/goog.math.math.js.map +9 -0
  140. package/dist/cljs-runtime/goog.math.size.js +76 -0
  141. package/dist/cljs-runtime/goog.math.size.js.map +9 -0
  142. package/dist/cljs-runtime/goog.object.object.js +284 -0
  143. package/dist/cljs-runtime/goog.object.object.js.map +9 -0
  144. package/dist/cljs-runtime/goog.reflect.reflect.js +32 -0
  145. package/dist/cljs-runtime/goog.reflect.reflect.js.map +9 -0
  146. package/dist/cljs-runtime/goog.string.const.js +35 -0
  147. package/dist/cljs-runtime/goog.string.const.js.map +9 -0
  148. package/dist/cljs-runtime/goog.string.internal.js +119 -0
  149. package/dist/cljs-runtime/goog.string.internal.js.map +9 -0
  150. package/dist/cljs-runtime/goog.string.string.js +462 -0
  151. package/dist/cljs-runtime/goog.string.string.js.map +9 -0
  152. package/dist/cljs-runtime/goog.string.stringbuffer.js +32 -0
  153. package/dist/cljs-runtime/goog.string.stringbuffer.js.map +9 -0
  154. package/dist/cljs-runtime/goog.string.typedstring.js +9 -0
  155. package/dist/cljs-runtime/goog.string.typedstring.js.map +9 -0
  156. package/dist/cljs-runtime/goog.structs.structs.js +199 -0
  157. package/dist/cljs-runtime/goog.structs.structs.js.map +9 -0
  158. package/dist/cljs-runtime/goog.uri.uri.js +628 -0
  159. package/dist/cljs-runtime/goog.uri.uri.js.map +9 -0
  160. package/dist/cljs-runtime/goog.uri.utils.js +326 -0
  161. package/dist/cljs-runtime/goog.uri.utils.js.map +9 -0
  162. package/dist/cljs-runtime/goog.useragent.useragent.js +139 -0
  163. package/dist/cljs-runtime/goog.useragent.useragent.js.map +9 -0
  164. package/dist/cljs-runtime/iris_layout.components.entity_card_group.js +202 -0
  165. package/dist/cljs-runtime/iris_layout.components.entity_card_group.js.map +1 -0
  166. package/dist/cljs-runtime/iris_layout.components.entity_tile.js +295 -0
  167. package/dist/cljs-runtime/iris_layout.components.entity_tile.js.map +1 -0
  168. package/dist/cljs-runtime/iris_layout.components.entity_tile_group.js +33 -0
  169. package/dist/cljs-runtime/iris_layout.components.entity_tile_group.js.map +1 -0
  170. package/dist/cljs-runtime/iris_layout.components.resizer.js +91 -0
  171. package/dist/cljs-runtime/iris_layout.components.resizer.js.map +1 -0
  172. package/dist/cljs-runtime/iris_layout.components.touch_drag.js +399 -0
  173. package/dist/cljs-runtime/iris_layout.components.touch_drag.js.map +1 -0
  174. package/dist/cljs-runtime/iris_layout.core.js +1372 -0
  175. package/dist/cljs-runtime/iris_layout.core.js.map +1 -0
  176. package/dist/cljs-runtime/iris_layout.layout.js +328 -0
  177. package/dist/cljs-runtime/iris_layout.layout.js.map +1 -0
  178. package/dist/cljs-runtime/reagent.core.js +993 -0
  179. package/dist/cljs-runtime/reagent.core.js.map +1 -0
  180. package/dist/cljs-runtime/reagent.debug.js +75 -0
  181. package/dist/cljs-runtime/reagent.debug.js.map +1 -0
  182. package/dist/cljs-runtime/reagent.impl.batching.js +270 -0
  183. package/dist/cljs-runtime/reagent.impl.batching.js.map +1 -0
  184. package/dist/cljs-runtime/reagent.impl.component.js +758 -0
  185. package/dist/cljs-runtime/reagent.impl.component.js.map +1 -0
  186. package/dist/cljs-runtime/reagent.impl.input.js +175 -0
  187. package/dist/cljs-runtime/reagent.impl.input.js.map +1 -0
  188. package/dist/cljs-runtime/reagent.impl.protocols.js +99 -0
  189. package/dist/cljs-runtime/reagent.impl.protocols.js.map +1 -0
  190. package/dist/cljs-runtime/reagent.impl.template.js +660 -0
  191. package/dist/cljs-runtime/reagent.impl.template.js.map +1 -0
  192. package/dist/cljs-runtime/reagent.impl.util.js +748 -0
  193. package/dist/cljs-runtime/reagent.impl.util.js.map +1 -0
  194. package/dist/cljs-runtime/reagent.ratom.js +1668 -0
  195. package/dist/cljs-runtime/reagent.ratom.js.map +1 -0
  196. package/dist/cljs-runtime/shadow.esm.esm_import$react.js +5 -0
  197. package/dist/cljs-runtime/shadow.module.iris-layout.append.js +2 -0
  198. package/dist/cljs-runtime/shadow.module.iris-layout.prepend.js +2 -0
  199. package/dist/iris-layout.js +375 -355
  200. package/dist/styles.css +287 -9
  201. package/package.json +1 -1
@@ -0,0 +1,628 @@
1
+ import "./cljs_env.js";
2
+ import "./goog.array.array.js";
3
+ import "./goog.asserts.asserts.js";
4
+ import "./goog.collections.maps.js";
5
+ import "./goog.string.string.js";
6
+ import "./goog.structs.structs.js";
7
+ import "./goog.uri.utils.js";
8
+ goog.provide("goog.Uri");
9
+ goog.provide("goog.Uri.QueryData");
10
+ goog.require("goog.array");
11
+ goog.require("goog.asserts");
12
+ goog.require("goog.collections.maps");
13
+ goog.require("goog.string");
14
+ goog.require("goog.structs");
15
+ goog.require("goog.uri.utils");
16
+ goog.require("goog.uri.utils.ComponentIndex");
17
+ goog.require("goog.uri.utils.StandardQueryParam");
18
+ goog.Uri = function(opt_uri, opt_ignoreCase) {
19
+ this.scheme_ = "";
20
+ this.userInfo_ = "";
21
+ this.domain_ = "";
22
+ this.port_ = null;
23
+ this.path_ = "";
24
+ this.fragment_ = "";
25
+ this.isReadOnly_ = false;
26
+ this.ignoreCase_ = false;
27
+ this.queryData_;
28
+ var m;
29
+ if (opt_uri instanceof goog.Uri) {
30
+ this.ignoreCase_ = opt_ignoreCase !== undefined ? opt_ignoreCase : opt_uri.getIgnoreCase();
31
+ this.setScheme(opt_uri.getScheme());
32
+ this.setUserInfo(opt_uri.getUserInfo());
33
+ this.setDomain(opt_uri.getDomain());
34
+ this.setPort(opt_uri.getPort());
35
+ this.setPath(opt_uri.getPath());
36
+ this.setQueryData(opt_uri.getQueryData().clone());
37
+ this.setFragment(opt_uri.getFragment());
38
+ } else if (opt_uri && (m = goog.uri.utils.split(String(opt_uri)))) {
39
+ this.ignoreCase_ = !!opt_ignoreCase;
40
+ this.setScheme(m[goog.uri.utils.ComponentIndex.SCHEME] || "", true);
41
+ this.setUserInfo(m[goog.uri.utils.ComponentIndex.USER_INFO] || "", true);
42
+ this.setDomain(m[goog.uri.utils.ComponentIndex.DOMAIN] || "", true);
43
+ this.setPort(m[goog.uri.utils.ComponentIndex.PORT]);
44
+ this.setPath(m[goog.uri.utils.ComponentIndex.PATH] || "", true);
45
+ this.setQueryData(m[goog.uri.utils.ComponentIndex.QUERY_DATA] || "", true);
46
+ this.setFragment(m[goog.uri.utils.ComponentIndex.FRAGMENT] || "", true);
47
+ } else {
48
+ this.ignoreCase_ = !!opt_ignoreCase;
49
+ this.queryData_ = new goog.Uri.QueryData(null, this.ignoreCase_);
50
+ }
51
+ };
52
+ goog.Uri.RANDOM_PARAM = goog.uri.utils.StandardQueryParam.RANDOM;
53
+ goog.Uri.prototype.toString = function() {
54
+ var out = [];
55
+ var scheme = this.getScheme();
56
+ if (scheme) {
57
+ out.push(goog.Uri.encodeSpecialChars_(scheme, goog.Uri.reDisallowedInSchemeOrUserInfo_, true), ":");
58
+ }
59
+ var domain = this.getDomain();
60
+ if (domain || scheme == "file") {
61
+ out.push("//");
62
+ var userInfo = this.getUserInfo();
63
+ if (userInfo) {
64
+ out.push(goog.Uri.encodeSpecialChars_(userInfo, goog.Uri.reDisallowedInSchemeOrUserInfo_, true), "@");
65
+ }
66
+ out.push(goog.Uri.removeDoubleEncoding_(goog.string.urlEncode(domain)));
67
+ var port = this.getPort();
68
+ if (port != null) {
69
+ out.push(":", String(port));
70
+ }
71
+ }
72
+ var path = this.getPath();
73
+ if (path) {
74
+ if (this.hasDomain() && path.charAt(0) != "/") {
75
+ out.push("/");
76
+ }
77
+ out.push(goog.Uri.encodeSpecialChars_(path, path.charAt(0) == "/" ? goog.Uri.reDisallowedInAbsolutePath_ : goog.Uri.reDisallowedInRelativePath_, true));
78
+ }
79
+ var query = this.getEncodedQuery();
80
+ if (query) {
81
+ out.push("?", query);
82
+ }
83
+ var fragment = this.getFragment();
84
+ if (fragment) {
85
+ out.push("#", goog.Uri.encodeSpecialChars_(fragment, goog.Uri.reDisallowedInFragment_));
86
+ }
87
+ return out.join("");
88
+ };
89
+ goog.Uri.prototype.resolve = function(relativeUri) {
90
+ var absoluteUri = this.clone();
91
+ var overridden = relativeUri.hasScheme();
92
+ if (overridden) {
93
+ absoluteUri.setScheme(relativeUri.getScheme());
94
+ } else {
95
+ overridden = relativeUri.hasUserInfo();
96
+ }
97
+ if (overridden) {
98
+ absoluteUri.setUserInfo(relativeUri.getUserInfo());
99
+ } else {
100
+ overridden = relativeUri.hasDomain();
101
+ }
102
+ if (overridden) {
103
+ absoluteUri.setDomain(relativeUri.getDomain());
104
+ } else {
105
+ overridden = relativeUri.hasPort();
106
+ }
107
+ var path = relativeUri.getPath();
108
+ if (overridden) {
109
+ absoluteUri.setPort(relativeUri.getPort());
110
+ } else {
111
+ overridden = relativeUri.hasPath();
112
+ if (overridden) {
113
+ if (path.charAt(0) != "/") {
114
+ if (this.hasDomain() && !this.hasPath()) {
115
+ path = "/" + path;
116
+ } else {
117
+ var lastSlashIndex = absoluteUri.getPath().lastIndexOf("/");
118
+ if (lastSlashIndex != -1) {
119
+ path = absoluteUri.getPath().slice(0, lastSlashIndex + 1) + path;
120
+ }
121
+ }
122
+ }
123
+ path = goog.Uri.removeDotSegments(path);
124
+ }
125
+ }
126
+ if (overridden) {
127
+ absoluteUri.setPath(path);
128
+ } else {
129
+ overridden = relativeUri.hasQuery();
130
+ }
131
+ if (overridden) {
132
+ absoluteUri.setQueryData(relativeUri.getQueryData().clone());
133
+ } else {
134
+ overridden = relativeUri.hasFragment();
135
+ }
136
+ if (overridden) {
137
+ absoluteUri.setFragment(relativeUri.getFragment());
138
+ }
139
+ return absoluteUri;
140
+ };
141
+ goog.Uri.prototype.clone = function() {
142
+ return new goog.Uri(this);
143
+ };
144
+ goog.Uri.prototype.getScheme = function() {
145
+ return this.scheme_;
146
+ };
147
+ goog.Uri.prototype.setScheme = function(newScheme, opt_decode) {
148
+ this.enforceReadOnly();
149
+ this.scheme_ = opt_decode ? goog.Uri.decodeOrEmpty_(newScheme, true) : newScheme;
150
+ if (this.scheme_) {
151
+ this.scheme_ = this.scheme_.replace(/:$/, "");
152
+ }
153
+ return this;
154
+ };
155
+ goog.Uri.prototype.hasScheme = function() {
156
+ return !!this.scheme_;
157
+ };
158
+ goog.Uri.prototype.getUserInfo = function() {
159
+ return this.userInfo_;
160
+ };
161
+ goog.Uri.prototype.setUserInfo = function(newUserInfo, opt_decode) {
162
+ this.enforceReadOnly();
163
+ this.userInfo_ = opt_decode ? goog.Uri.decodeOrEmpty_(newUserInfo) : newUserInfo;
164
+ return this;
165
+ };
166
+ goog.Uri.prototype.hasUserInfo = function() {
167
+ return !!this.userInfo_;
168
+ };
169
+ goog.Uri.prototype.getDomain = function() {
170
+ return this.domain_;
171
+ };
172
+ goog.Uri.prototype.setDomain = function(newDomain, opt_decode) {
173
+ this.enforceReadOnly();
174
+ this.domain_ = opt_decode ? goog.Uri.decodeOrEmpty_(newDomain, true) : newDomain;
175
+ return this;
176
+ };
177
+ goog.Uri.prototype.hasDomain = function() {
178
+ return !!this.domain_;
179
+ };
180
+ goog.Uri.prototype.getPort = function() {
181
+ return this.port_;
182
+ };
183
+ goog.Uri.prototype.setPort = function(newPort) {
184
+ this.enforceReadOnly();
185
+ if (newPort) {
186
+ newPort = Number(newPort);
187
+ if (isNaN(newPort) || newPort < 0) {
188
+ throw new Error("Bad port number " + newPort);
189
+ }
190
+ this.port_ = newPort;
191
+ } else {
192
+ this.port_ = null;
193
+ }
194
+ return this;
195
+ };
196
+ goog.Uri.prototype.hasPort = function() {
197
+ return this.port_ != null;
198
+ };
199
+ goog.Uri.prototype.getPath = function() {
200
+ return this.path_;
201
+ };
202
+ goog.Uri.prototype.setPath = function(newPath, opt_decode) {
203
+ this.enforceReadOnly();
204
+ this.path_ = opt_decode ? goog.Uri.decodeOrEmpty_(newPath, true) : newPath;
205
+ return this;
206
+ };
207
+ goog.Uri.prototype.hasPath = function() {
208
+ return !!this.path_;
209
+ };
210
+ goog.Uri.prototype.hasQuery = function() {
211
+ return this.queryData_.toString() !== "";
212
+ };
213
+ goog.Uri.prototype.setQueryData = function(queryData, opt_decode) {
214
+ this.enforceReadOnly();
215
+ if (queryData instanceof goog.Uri.QueryData) {
216
+ this.queryData_ = queryData;
217
+ this.queryData_.setIgnoreCase(this.ignoreCase_);
218
+ } else {
219
+ if (!opt_decode) {
220
+ queryData = goog.Uri.encodeSpecialChars_(queryData, goog.Uri.reDisallowedInQuery_);
221
+ }
222
+ this.queryData_ = new goog.Uri.QueryData(queryData, this.ignoreCase_);
223
+ }
224
+ return this;
225
+ };
226
+ goog.Uri.prototype.setQuery = function(newQuery, opt_decode) {
227
+ return this.setQueryData(newQuery, opt_decode);
228
+ };
229
+ goog.Uri.prototype.getEncodedQuery = function() {
230
+ return this.queryData_.toString();
231
+ };
232
+ goog.Uri.prototype.getDecodedQuery = function() {
233
+ return this.queryData_.toDecodedString();
234
+ };
235
+ goog.Uri.prototype.getQueryData = function() {
236
+ return this.queryData_;
237
+ };
238
+ goog.Uri.prototype.getQuery = function() {
239
+ return this.getEncodedQuery();
240
+ };
241
+ goog.Uri.prototype.setParameterValue = function(key, value) {
242
+ this.enforceReadOnly();
243
+ this.queryData_.set(key, value);
244
+ return this;
245
+ };
246
+ goog.Uri.prototype.setParameterValues = function(key, values) {
247
+ this.enforceReadOnly();
248
+ if (!Array.isArray(values)) {
249
+ values = [String(values)];
250
+ }
251
+ this.queryData_.setValues(key, values);
252
+ return this;
253
+ };
254
+ goog.Uri.prototype.getParameterValues = function(name) {
255
+ return this.queryData_.getValues(name);
256
+ };
257
+ goog.Uri.prototype.getParameterValue = function(paramName) {
258
+ return this.queryData_.get(paramName);
259
+ };
260
+ goog.Uri.prototype.getFragment = function() {
261
+ return this.fragment_;
262
+ };
263
+ goog.Uri.prototype.setFragment = function(newFragment, opt_decode) {
264
+ this.enforceReadOnly();
265
+ this.fragment_ = opt_decode ? goog.Uri.decodeOrEmpty_(newFragment) : newFragment;
266
+ return this;
267
+ };
268
+ goog.Uri.prototype.hasFragment = function() {
269
+ return !!this.fragment_;
270
+ };
271
+ goog.Uri.prototype.hasSameDomainAs = function(uri2) {
272
+ return (!this.hasDomain() && !uri2.hasDomain() || this.getDomain() == uri2.getDomain()) && (!this.hasPort() && !uri2.hasPort() || this.getPort() == uri2.getPort());
273
+ };
274
+ goog.Uri.prototype.makeUnique = function() {
275
+ this.enforceReadOnly();
276
+ this.setParameterValue(goog.Uri.RANDOM_PARAM, goog.string.getRandomString());
277
+ return this;
278
+ };
279
+ goog.Uri.prototype.removeParameter = function(key) {
280
+ this.enforceReadOnly();
281
+ this.queryData_.remove(key);
282
+ return this;
283
+ };
284
+ goog.Uri.prototype.setReadOnly = function(isReadOnly) {
285
+ this.isReadOnly_ = isReadOnly;
286
+ return this;
287
+ };
288
+ goog.Uri.prototype.isReadOnly = function() {
289
+ return this.isReadOnly_;
290
+ };
291
+ goog.Uri.prototype.enforceReadOnly = function() {
292
+ if (this.isReadOnly_) {
293
+ throw new Error("Tried to modify a read-only Uri");
294
+ }
295
+ };
296
+ goog.Uri.prototype.setIgnoreCase = function(ignoreCase) {
297
+ this.ignoreCase_ = ignoreCase;
298
+ if (this.queryData_) {
299
+ this.queryData_.setIgnoreCase(ignoreCase);
300
+ }
301
+ return this;
302
+ };
303
+ goog.Uri.prototype.getIgnoreCase = function() {
304
+ return this.ignoreCase_;
305
+ };
306
+ goog.Uri.parse = function(uri, opt_ignoreCase) {
307
+ return uri instanceof goog.Uri ? uri.clone() : new goog.Uri(uri, opt_ignoreCase);
308
+ };
309
+ goog.Uri.create = function(opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_query, opt_fragment, opt_ignoreCase) {
310
+ var uri = new goog.Uri(null, opt_ignoreCase);
311
+ opt_scheme && uri.setScheme(opt_scheme);
312
+ opt_userInfo && uri.setUserInfo(opt_userInfo);
313
+ opt_domain && uri.setDomain(opt_domain);
314
+ opt_port && uri.setPort(opt_port);
315
+ opt_path && uri.setPath(opt_path);
316
+ opt_query && uri.setQueryData(opt_query);
317
+ opt_fragment && uri.setFragment(opt_fragment);
318
+ return uri;
319
+ };
320
+ goog.Uri.resolve = function(base, rel) {
321
+ if (!(base instanceof goog.Uri)) {
322
+ base = goog.Uri.parse(base);
323
+ }
324
+ if (!(rel instanceof goog.Uri)) {
325
+ rel = goog.Uri.parse(rel);
326
+ }
327
+ return base.resolve(rel);
328
+ };
329
+ goog.Uri.removeDotSegments = function(path) {
330
+ if (path == ".." || path == ".") {
331
+ return "";
332
+ } else if (!goog.string.contains(path, "./") && !goog.string.contains(path, "/.")) {
333
+ return path;
334
+ } else {
335
+ var leadingSlash = goog.string.startsWith(path, "/");
336
+ var segments = path.split("/");
337
+ var out = [];
338
+ var pos = 0;
339
+ for (; pos < segments.length;) {
340
+ var segment = segments[pos++];
341
+ if (segment == ".") {
342
+ if (leadingSlash && pos == segments.length) {
343
+ out.push("");
344
+ }
345
+ } else if (segment == "..") {
346
+ if (out.length > 1 || out.length == 1 && out[0] != "") {
347
+ out.pop();
348
+ }
349
+ if (leadingSlash && pos == segments.length) {
350
+ out.push("");
351
+ }
352
+ } else {
353
+ out.push(segment);
354
+ leadingSlash = true;
355
+ }
356
+ }
357
+ return out.join("/");
358
+ }
359
+ };
360
+ goog.Uri.decodeOrEmpty_ = function(val, opt_preserveReserved) {
361
+ if (!val) {
362
+ return "";
363
+ }
364
+ return opt_preserveReserved ? decodeURI(val.replace(/%25/g, "%2525")) : decodeURIComponent(val);
365
+ };
366
+ goog.Uri.encodeSpecialChars_ = function(unescapedPart, extra, opt_removeDoubleEncoding) {
367
+ if (typeof unescapedPart === "string") {
368
+ var encoded = encodeURI(unescapedPart).replace(extra, goog.Uri.encodeChar_);
369
+ if (opt_removeDoubleEncoding) {
370
+ encoded = goog.Uri.removeDoubleEncoding_(encoded);
371
+ }
372
+ return encoded;
373
+ }
374
+ return null;
375
+ };
376
+ goog.Uri.encodeChar_ = function(ch) {
377
+ var n = ch.charCodeAt(0);
378
+ return "%" + (n >> 4 & 15).toString(16) + (n & 15).toString(16);
379
+ };
380
+ goog.Uri.removeDoubleEncoding_ = function(doubleEncodedString) {
381
+ return doubleEncodedString.replace(/%25([0-9a-fA-F]{2})/g, "%$1");
382
+ };
383
+ goog.Uri.reDisallowedInSchemeOrUserInfo_ = /[#\/\?@]/g;
384
+ goog.Uri.reDisallowedInRelativePath_ = /[#\?:]/g;
385
+ goog.Uri.reDisallowedInAbsolutePath_ = /[#\?]/g;
386
+ goog.Uri.reDisallowedInQuery_ = /[#\?@]/g;
387
+ goog.Uri.reDisallowedInFragment_ = /#/g;
388
+ goog.Uri.haveSameDomain = function(uri1String, uri2String) {
389
+ var pieces1 = goog.uri.utils.split(uri1String);
390
+ var pieces2 = goog.uri.utils.split(uri2String);
391
+ return pieces1[goog.uri.utils.ComponentIndex.DOMAIN] == pieces2[goog.uri.utils.ComponentIndex.DOMAIN] && pieces1[goog.uri.utils.ComponentIndex.PORT] == pieces2[goog.uri.utils.ComponentIndex.PORT];
392
+ };
393
+ goog.Uri.QueryData = function(opt_query, opt_ignoreCase) {
394
+ this.keyMap_ = null;
395
+ this.count_ = null;
396
+ this.encodedQuery_ = opt_query || null;
397
+ this.ignoreCase_ = !!opt_ignoreCase;
398
+ };
399
+ goog.Uri.QueryData.prototype.ensureKeyMapInitialized_ = function() {
400
+ if (!this.keyMap_) {
401
+ this.keyMap_ = new Map();
402
+ this.count_ = 0;
403
+ if (this.encodedQuery_) {
404
+ var self = this;
405
+ goog.uri.utils.parseQueryData(this.encodedQuery_, function(name, value) {
406
+ self.add(goog.string.urlDecode(name), value);
407
+ });
408
+ }
409
+ }
410
+ };
411
+ goog.Uri.QueryData.createFromMap = function(map, opt_ignoreCase) {
412
+ var keys = goog.structs.getKeys(map);
413
+ if (typeof keys == "undefined") {
414
+ throw new Error("Keys are undefined");
415
+ }
416
+ var queryData = new goog.Uri.QueryData(null, opt_ignoreCase);
417
+ var values = goog.structs.getValues(map);
418
+ var i = 0;
419
+ for (; i < keys.length; i++) {
420
+ var key = keys[i];
421
+ var value = values[i];
422
+ if (!Array.isArray(value)) {
423
+ queryData.add(key, value);
424
+ } else {
425
+ queryData.setValues(key, value);
426
+ }
427
+ }
428
+ return queryData;
429
+ };
430
+ goog.Uri.QueryData.createFromKeysValues = function(keys, values, opt_ignoreCase) {
431
+ if (keys.length != values.length) {
432
+ throw new Error("Mismatched lengths for keys/values");
433
+ }
434
+ var queryData = new goog.Uri.QueryData(null, opt_ignoreCase);
435
+ var i = 0;
436
+ for (; i < keys.length; i++) {
437
+ queryData.add(keys[i], values[i]);
438
+ }
439
+ return queryData;
440
+ };
441
+ goog.Uri.QueryData.prototype.getCount = function() {
442
+ this.ensureKeyMapInitialized_();
443
+ return this.count_;
444
+ };
445
+ goog.Uri.QueryData.prototype.add = function(key, value) {
446
+ this.ensureKeyMapInitialized_();
447
+ this.invalidateCache_();
448
+ key = this.getKeyName_(key);
449
+ var values = this.keyMap_.get(key);
450
+ if (!values) {
451
+ this.keyMap_.set(key, values = []);
452
+ }
453
+ values.push(value);
454
+ this.count_ = goog.asserts.assertNumber(this.count_) + 1;
455
+ return this;
456
+ };
457
+ goog.Uri.QueryData.prototype.remove = function(key) {
458
+ this.ensureKeyMapInitialized_();
459
+ key = this.getKeyName_(key);
460
+ if (this.keyMap_.has(key)) {
461
+ this.invalidateCache_();
462
+ this.count_ = goog.asserts.assertNumber(this.count_) - this.keyMap_.get(key).length;
463
+ return this.keyMap_.delete(key);
464
+ }
465
+ return false;
466
+ };
467
+ goog.Uri.QueryData.prototype.clear = function() {
468
+ this.invalidateCache_();
469
+ this.keyMap_ = null;
470
+ this.count_ = 0;
471
+ };
472
+ goog.Uri.QueryData.prototype.isEmpty = function() {
473
+ this.ensureKeyMapInitialized_();
474
+ return this.count_ == 0;
475
+ };
476
+ goog.Uri.QueryData.prototype.containsKey = function(key) {
477
+ this.ensureKeyMapInitialized_();
478
+ key = this.getKeyName_(key);
479
+ return this.keyMap_.has(key);
480
+ };
481
+ goog.Uri.QueryData.prototype.containsValue = function(value) {
482
+ var vals = this.getValues();
483
+ return goog.array.contains(vals, value);
484
+ };
485
+ goog.Uri.QueryData.prototype.forEach = function(f, opt_scope) {
486
+ this.ensureKeyMapInitialized_();
487
+ this.keyMap_.forEach(function(values, key) {
488
+ values.forEach(function(value) {
489
+ f.call(opt_scope, value, key, this);
490
+ }, this);
491
+ }, this);
492
+ };
493
+ goog.Uri.QueryData.prototype.getKeys = function() {
494
+ this.ensureKeyMapInitialized_();
495
+ const vals = Array.from(this.keyMap_.values());
496
+ const keys = Array.from(this.keyMap_.keys());
497
+ const rv = [];
498
+ for (let i = 0; i < keys.length; i++) {
499
+ const val = vals[i];
500
+ for (let j = 0; j < val.length; j++) {
501
+ rv.push(keys[i]);
502
+ }
503
+ }
504
+ return rv;
505
+ };
506
+ goog.Uri.QueryData.prototype.getValues = function(opt_key) {
507
+ this.ensureKeyMapInitialized_();
508
+ let rv = [];
509
+ if (typeof opt_key === "string") {
510
+ if (this.containsKey(opt_key)) {
511
+ rv = rv.concat(this.keyMap_.get(this.getKeyName_(opt_key)));
512
+ }
513
+ } else {
514
+ const values = Array.from(this.keyMap_.values());
515
+ for (let i = 0; i < values.length; i++) {
516
+ rv = rv.concat(values[i]);
517
+ }
518
+ }
519
+ return rv;
520
+ };
521
+ goog.Uri.QueryData.prototype.set = function(key, value) {
522
+ this.ensureKeyMapInitialized_();
523
+ this.invalidateCache_();
524
+ key = this.getKeyName_(key);
525
+ if (this.containsKey(key)) {
526
+ this.count_ = goog.asserts.assertNumber(this.count_) - this.keyMap_.get(key).length;
527
+ }
528
+ this.keyMap_.set(key, [value]);
529
+ this.count_ = goog.asserts.assertNumber(this.count_) + 1;
530
+ return this;
531
+ };
532
+ goog.Uri.QueryData.prototype.get = function(key, opt_default) {
533
+ if (!key) {
534
+ return opt_default;
535
+ }
536
+ var values = this.getValues(key);
537
+ return values.length > 0 ? String(values[0]) : opt_default;
538
+ };
539
+ goog.Uri.QueryData.prototype.setValues = function(key, values) {
540
+ this.remove(key);
541
+ if (values.length > 0) {
542
+ this.invalidateCache_();
543
+ this.keyMap_.set(this.getKeyName_(key), goog.array.clone(values));
544
+ this.count_ = goog.asserts.assertNumber(this.count_) + values.length;
545
+ }
546
+ };
547
+ goog.Uri.QueryData.prototype.toString = function() {
548
+ if (this.encodedQuery_) {
549
+ return this.encodedQuery_;
550
+ }
551
+ if (!this.keyMap_) {
552
+ return "";
553
+ }
554
+ const sb = [];
555
+ const keys = Array.from(this.keyMap_.keys());
556
+ var i = 0;
557
+ for (; i < keys.length; i++) {
558
+ const key = keys[i];
559
+ const encodedKey = goog.string.urlEncode(key);
560
+ const val = this.getValues(key);
561
+ var j = 0;
562
+ for (; j < val.length; j++) {
563
+ var param = encodedKey;
564
+ if (val[j] !== "") {
565
+ param = param + ("\x3d" + goog.string.urlEncode(val[j]));
566
+ }
567
+ sb.push(param);
568
+ }
569
+ }
570
+ return this.encodedQuery_ = sb.join("\x26");
571
+ };
572
+ goog.Uri.QueryData.prototype.toDecodedString = function() {
573
+ return goog.Uri.decodeOrEmpty_(this.toString());
574
+ };
575
+ goog.Uri.QueryData.prototype.invalidateCache_ = function() {
576
+ this.encodedQuery_ = null;
577
+ };
578
+ goog.Uri.QueryData.prototype.filterKeys = function(keys) {
579
+ this.ensureKeyMapInitialized_();
580
+ this.keyMap_.forEach(function(value, key) {
581
+ if (!goog.array.contains(keys, key)) {
582
+ this.remove(key);
583
+ }
584
+ }, this);
585
+ return this;
586
+ };
587
+ goog.Uri.QueryData.prototype.clone = function() {
588
+ var rv = new goog.Uri.QueryData();
589
+ rv.encodedQuery_ = this.encodedQuery_;
590
+ if (this.keyMap_) {
591
+ rv.keyMap_ = new Map(this.keyMap_);
592
+ rv.count_ = this.count_;
593
+ }
594
+ return rv;
595
+ };
596
+ goog.Uri.QueryData.prototype.getKeyName_ = function(arg) {
597
+ var keyName = String(arg);
598
+ if (this.ignoreCase_) {
599
+ keyName = keyName.toLowerCase();
600
+ }
601
+ return keyName;
602
+ };
603
+ goog.Uri.QueryData.prototype.setIgnoreCase = function(ignoreCase) {
604
+ var resetKeys = ignoreCase && !this.ignoreCase_;
605
+ if (resetKeys) {
606
+ this.ensureKeyMapInitialized_();
607
+ this.invalidateCache_();
608
+ this.keyMap_.forEach(function(value, key) {
609
+ var lowerCase = key.toLowerCase();
610
+ if (key != lowerCase) {
611
+ this.remove(key);
612
+ this.setValues(lowerCase, value);
613
+ }
614
+ }, this);
615
+ }
616
+ this.ignoreCase_ = ignoreCase;
617
+ };
618
+ goog.Uri.QueryData.prototype.extend = function(var_args) {
619
+ var i = 0;
620
+ for (; i < arguments.length; i++) {
621
+ var data = arguments[i];
622
+ goog.structs.forEach(data, function(value, key) {
623
+ this.add(key, value);
624
+ }, this);
625
+ }
626
+ };
627
+
628
+ //# sourceMappingURL=goog.uri.uri.js.map