Flowfile 0.3.1.2__py3-none-any.whl → 0.3.2__py3-none-any.whl
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.
- flowfile/api.py +5 -3
- flowfile/web/static/assets/{AirbyteReader-cb0c1d4a.js → AirbyteReader-2b1cf2d8.js} +10 -9
- flowfile/web/static/assets/{CrossJoin-a514fa59.js → CrossJoin-cc3ab73c.js} +8 -8
- flowfile/web/static/assets/{DatabaseConnectionSettings-f2cecf33.js → DatabaseConnectionSettings-307c4652.js} +2 -2
- flowfile/web/static/assets/{DatabaseManager-83ee3c98.js → DatabaseManager-69faa6e1.js} +10 -6
- flowfile/web/static/assets/{DatabaseReader-dc0c6881.js → DatabaseReader-e4134cd0.js} +9 -9
- flowfile/web/static/assets/{DatabaseWriter-5afe9f8d.js → DatabaseWriter-d32d75b1.js} +9 -9
- flowfile/web/static/assets/{ExploreData-c7ee19cf.js → ExploreData-5eb48389.js} +18639 -18629
- flowfile/web/static/assets/{ExternalSource-17b23a01.js → ExternalSource-29489051.js} +8 -21
- flowfile/web/static/assets/{Filter-90856b4f.js → Filter-031332bb.js} +9 -9
- flowfile/web/static/assets/{Formula-38b71e9e.js → Formula-3b900540.js} +15 -15
- flowfile/web/static/assets/{Formula-d60a74f4.css → Formula-b8cefc31.css} +4 -4
- flowfile/web/static/assets/{FuzzyMatch-d0f1fe81.js → FuzzyMatch-dee31153.js} +9 -9
- flowfile/web/static/assets/{GraphSolver-0c86bbc6.js → GraphSolver-ca74eb47.js} +5 -5
- flowfile/web/static/assets/{GroupBy-f2772e9f.js → GroupBy-081b6591.js} +8 -7
- flowfile/web/static/assets/{Join-bc3e1cf7.js → Join-b467376f.js} +11 -10
- flowfile/web/static/assets/{ManualInput-03aa0245.js → ManualInput-ffffb80a.js} +11 -8
- flowfile/web/static/assets/{Output-5b35eee8.js → Output-9a87d4ba.js} +4 -4
- flowfile/web/static/assets/{Pivot-7164087c.js → Pivot-ee3e6093.js} +8 -7
- flowfile/web/static/assets/{PolarsCode-3abf6507.js → PolarsCode-03921254.js} +13 -11
- flowfile/web/static/assets/{PopOver-b37ff9be.js → PopOver-3bdf8951.js} +1 -1
- flowfile/web/static/assets/{Read-65966a3e.js → Read-67fee3a0.js} +6 -6
- flowfile/web/static/assets/{RecordCount-c66c6d6d.js → RecordCount-a2acd02d.js} +7 -6
- flowfile/web/static/assets/{RecordId-826dc095.js → RecordId-0c8bcd77.js} +10 -8
- flowfile/web/static/assets/{Sample-4ed555c8.js → Sample-60594a3a.js} +7 -6
- flowfile/web/static/assets/{SecretManager-eac1e97d.js → SecretManager-bbcec2ac.js} +2 -2
- flowfile/web/static/assets/{Select-085f05cc.js → Select-9540e6ca.js} +8 -8
- flowfile/web/static/assets/{SettingsSection-1f5e79c1.js → SettingsSection-48f28104.js} +1 -1
- flowfile/web/static/assets/{Sort-3e6cb414.js → Sort-6dbe3633.js} +6 -6
- flowfile/web/static/assets/{TextToRows-606349bc.js → TextToRows-27aab4a8.js} +18 -13
- flowfile/web/static/assets/{UnavailableFields-b41976ed.js → UnavailableFields-8143044b.js} +2 -2
- flowfile/web/static/assets/{Union-fca91665.js → Union-52460248.js} +7 -6
- flowfile/web/static/assets/{Unique-a59f830e.js → Unique-f6962644.js} +8 -8
- flowfile/web/static/assets/{Unpivot-c3815565.js → Unpivot-1ff1e938.js} +5 -5
- flowfile/web/static/assets/{api-22b338bd.js → api-3b345d92.js} +1 -1
- flowfile/web/static/assets/{designer-e5bbe26f.js → designer-4736134f.js} +72 -42
- flowfile/web/static/assets/{documentation-08045cf2.js → documentation-b9545eba.js} +1 -1
- flowfile/web/static/assets/{dropDown-5e7e9a5a.js → dropDown-d5a4014c.js} +1 -1
- flowfile/web/static/assets/{dropDownGeneric-50a91b99.js → dropDownGeneric-1f4e32ec.js} +2 -2
- flowfile/web/static/assets/{fullEditor-705c6ccb.js → fullEditor-f4791c23.js} +3 -3
- flowfile/web/static/assets/{genericNodeSettings-65587f20.js → genericNodeSettings-1d456350.js} +3 -3
- flowfile/web/static/assets/{index-552863fd.js → index-f25c9283.js} +2608 -1570
- flowfile/web/static/assets/{nodeTitle-cf9bae3c.js → nodeTitle-cad6fd9d.js} +3 -3
- flowfile/web/static/assets/{secretApi-3ad510e1.js → secretApi-01f07e2c.js} +1 -1
- flowfile/web/static/assets/{selectDynamic-bd644891.js → selectDynamic-f46a4e3f.js} +3 -3
- flowfile/web/static/assets/{vue-codemirror.esm-dd17b478.js → vue-codemirror.esm-eb98fc8b.js} +15 -14
- flowfile/web/static/assets/{vue-content-loader.es-6b36f05e.js → vue-content-loader.es-860c0380.js} +1 -1
- flowfile/web/static/index.html +1 -1
- {flowfile-0.3.1.2.dist-info → flowfile-0.3.2.dist-info}/METADATA +1 -3
- {flowfile-0.3.1.2.dist-info → flowfile-0.3.2.dist-info}/RECORD +62 -64
- flowfile_core/configs/node_store/nodes.py +2 -4
- flowfile_core/flowfile/FlowfileFlow.py +72 -12
- flowfile_core/flowfile/flow_data_engine/flow_data_engine.py +1 -1
- flowfile_core/flowfile/flow_data_engine/polars_code_parser.py +32 -1
- flowfile_core/flowfile/flow_graph_utils.py +320 -0
- flowfile_core/flowfile/sources/external_sources/custom_external_sources/__init__.py +0 -1
- flowfile_core/schemas/input_schema.py +2 -10
- flowfile_frame/__init__.py +1 -1
- flowfile_frame/flow_frame.py +455 -51
- flowfile/web/static/assets/GoogleSheet-854294a4.js +0 -2616
- flowfile/web/static/assets/GoogleSheet-92084da7.css +0 -233
- flowfile_core/flowfile/sources/external_sources/custom_external_sources/google_sheet.py +0 -74
- {flowfile-0.3.1.2.dist-info → flowfile-0.3.2.dist-info}/LICENSE +0 -0
- {flowfile-0.3.1.2.dist-info → flowfile-0.3.2.dist-info}/WHEEL +0 -0
- {flowfile-0.3.1.2.dist-info → flowfile-0.3.2.dist-info}/entry_points.txt +0 -0
|
@@ -1,2616 +0,0 @@
|
|
|
1
|
-
import { C as CodeLoader } from "./vue-content-loader.es-6b36f05e.js";
|
|
2
|
-
import { _ as _imports_1 } from "./designer-e5bbe26f.js";
|
|
3
|
-
import { d as defineComponent, r as ref, l as computed, n as onMounted, b as resolveComponent, c as openBlock, e as createElementBlock, p as createBaseVNode, g as createTextVNode, i as createCommentVNode, t as toDisplayString, f as createVNode, w as withCtx, F as Fragment, q as renderList, h as createBlock, s as normalizeClass, _ as _export_sfc, a2 as watchEffect, u as unref, m as watch, R as nextTick, a6 as Teleport } from "./index-552863fd.js";
|
|
4
|
-
import { u as useNodeStore } from "./PopOver-b37ff9be.js";
|
|
5
|
-
import { N as NodeButton, a as NodeTitle } from "./nodeTitle-cf9bae3c.js";
|
|
6
|
-
const _imports_0 = "/images/google.svg";
|
|
7
|
-
var gapi = window.gapi = window.gapi || {};
|
|
8
|
-
gapi._bs = (/* @__PURE__ */ new Date()).getTime();
|
|
9
|
-
(function() {
|
|
10
|
-
var aa = "function" == typeof Object.defineProperties ? Object.defineProperty : function(a2, b2, c) {
|
|
11
|
-
if (a2 == Array.prototype || a2 == Object.prototype)
|
|
12
|
-
return a2;
|
|
13
|
-
a2[b2] = c.value;
|
|
14
|
-
return a2;
|
|
15
|
-
}, da = function(a2) {
|
|
16
|
-
a2 = ["object" == typeof globalThis && globalThis, a2, "object" == typeof window && window, "object" == typeof self && self, "object" == typeof global && global];
|
|
17
|
-
for (var b2 = 0; b2 < a2.length; ++b2) {
|
|
18
|
-
var c = a2[b2];
|
|
19
|
-
if (c && c.Math == Math)
|
|
20
|
-
return c;
|
|
21
|
-
}
|
|
22
|
-
throw Error("Cannot find global object");
|
|
23
|
-
}, ea = da(this), fa = function(a2, b2) {
|
|
24
|
-
if (b2)
|
|
25
|
-
a: {
|
|
26
|
-
var c = ea;
|
|
27
|
-
a2 = a2.split(".");
|
|
28
|
-
for (var d = 0; d < a2.length - 1; d++) {
|
|
29
|
-
var e = a2[d];
|
|
30
|
-
if (!(e in c))
|
|
31
|
-
break a;
|
|
32
|
-
c = c[e];
|
|
33
|
-
}
|
|
34
|
-
a2 = a2[a2.length - 1];
|
|
35
|
-
d = c[a2];
|
|
36
|
-
b2 = b2(d);
|
|
37
|
-
b2 != d && null != b2 && aa(c, a2, { configurable: true, writable: true, value: b2 });
|
|
38
|
-
}
|
|
39
|
-
}, ha = function(a2) {
|
|
40
|
-
var b2 = 0;
|
|
41
|
-
return function() {
|
|
42
|
-
return b2 < a2.length ? { done: false, value: a2[b2++] } : { done: true };
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
fa("Symbol", function(a2) {
|
|
46
|
-
if (a2)
|
|
47
|
-
return a2;
|
|
48
|
-
var b2 = function(e, f) {
|
|
49
|
-
this.ba = e;
|
|
50
|
-
aa(this, "description", { configurable: true, writable: true, value: f });
|
|
51
|
-
};
|
|
52
|
-
b2.prototype.toString = function() {
|
|
53
|
-
return this.ba;
|
|
54
|
-
};
|
|
55
|
-
var c = 0, d = function(e) {
|
|
56
|
-
if (this instanceof d)
|
|
57
|
-
throw new TypeError("Symbol is not a constructor");
|
|
58
|
-
return new b2("jscomp_symbol_" + (e || "") + "_" + c++, e);
|
|
59
|
-
};
|
|
60
|
-
return d;
|
|
61
|
-
});
|
|
62
|
-
fa("Symbol.iterator", function(a2) {
|
|
63
|
-
if (a2)
|
|
64
|
-
return a2;
|
|
65
|
-
a2 = Symbol("Symbol.iterator");
|
|
66
|
-
for (var b2 = "Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "), c = 0; c < b2.length; c++) {
|
|
67
|
-
var d = ea[b2[c]];
|
|
68
|
-
"function" === typeof d && "function" != typeof d.prototype[a2] && aa(d.prototype, a2, { configurable: true, writable: true, value: function() {
|
|
69
|
-
return ia(ha(this));
|
|
70
|
-
} });
|
|
71
|
-
}
|
|
72
|
-
return a2;
|
|
73
|
-
});
|
|
74
|
-
var ia = function(a2) {
|
|
75
|
-
a2 = { next: a2 };
|
|
76
|
-
a2[Symbol.iterator] = function() {
|
|
77
|
-
return this;
|
|
78
|
-
};
|
|
79
|
-
return a2;
|
|
80
|
-
}, ja = function(a2, b2) {
|
|
81
|
-
a2 instanceof String && (a2 += "");
|
|
82
|
-
var c = 0, d = false, e = { next: function() {
|
|
83
|
-
if (!d && c < a2.length) {
|
|
84
|
-
var f = c++;
|
|
85
|
-
return { value: b2(f, a2[f]), done: false };
|
|
86
|
-
}
|
|
87
|
-
d = true;
|
|
88
|
-
return { done: true, value: void 0 };
|
|
89
|
-
} };
|
|
90
|
-
e[Symbol.iterator] = function() {
|
|
91
|
-
return e;
|
|
92
|
-
};
|
|
93
|
-
return e;
|
|
94
|
-
};
|
|
95
|
-
fa("Array.prototype.keys", function(a2) {
|
|
96
|
-
return a2 ? a2 : function() {
|
|
97
|
-
return ja(this, function(b2) {
|
|
98
|
-
return b2;
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
});
|
|
102
|
-
var m = this || self, ka = function(a2) {
|
|
103
|
-
var b2 = typeof a2;
|
|
104
|
-
return "object" != b2 ? b2 : a2 ? Array.isArray(a2) ? "array" : b2 : "null";
|
|
105
|
-
}, la = function(a2, b2, c) {
|
|
106
|
-
return a2.call.apply(a2.bind, arguments);
|
|
107
|
-
}, ma = function(a2, b2, c) {
|
|
108
|
-
if (!a2)
|
|
109
|
-
throw Error();
|
|
110
|
-
if (2 < arguments.length) {
|
|
111
|
-
var d = Array.prototype.slice.call(arguments, 2);
|
|
112
|
-
return function() {
|
|
113
|
-
var e = Array.prototype.slice.call(arguments);
|
|
114
|
-
Array.prototype.unshift.apply(e, d);
|
|
115
|
-
return a2.apply(b2, e);
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
return function() {
|
|
119
|
-
return a2.apply(b2, arguments);
|
|
120
|
-
};
|
|
121
|
-
}, na = function(a2, b2, c) {
|
|
122
|
-
na = Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? la : ma;
|
|
123
|
-
return na.apply(null, arguments);
|
|
124
|
-
}, oa = function(a2, b2) {
|
|
125
|
-
function c() {
|
|
126
|
-
}
|
|
127
|
-
c.prototype = b2.prototype;
|
|
128
|
-
a2.ma = b2.prototype;
|
|
129
|
-
a2.prototype = new c();
|
|
130
|
-
a2.prototype.constructor = a2;
|
|
131
|
-
a2.A = function(d, e, f) {
|
|
132
|
-
for (var g = Array(arguments.length - 2), h = 2; h < arguments.length; h++)
|
|
133
|
-
g[h - 2] = arguments[h];
|
|
134
|
-
return b2.prototype[e].apply(d, g);
|
|
135
|
-
};
|
|
136
|
-
}, pa = function(a2) {
|
|
137
|
-
return a2;
|
|
138
|
-
}, qa = function(a2) {
|
|
139
|
-
var b2 = null, c = m.trustedTypes;
|
|
140
|
-
if (!c || !c.createPolicy)
|
|
141
|
-
return b2;
|
|
142
|
-
try {
|
|
143
|
-
b2 = c.createPolicy(a2, { createHTML: pa, createScript: pa, createScriptURL: pa });
|
|
144
|
-
} catch (d) {
|
|
145
|
-
m.console && m.console.error(d.message);
|
|
146
|
-
}
|
|
147
|
-
return b2;
|
|
148
|
-
};
|
|
149
|
-
function q(a2) {
|
|
150
|
-
if (Error.captureStackTrace)
|
|
151
|
-
Error.captureStackTrace(this, q);
|
|
152
|
-
else {
|
|
153
|
-
var b2 = Error().stack;
|
|
154
|
-
b2 && (this.stack = b2);
|
|
155
|
-
}
|
|
156
|
-
a2 && (this.message = String(a2));
|
|
157
|
-
}
|
|
158
|
-
oa(q, Error);
|
|
159
|
-
q.prototype.name = "CustomError";
|
|
160
|
-
var ra = function(a2, b2) {
|
|
161
|
-
a2 = a2.split("%s");
|
|
162
|
-
for (var c = "", d = a2.length - 1, e = 0; e < d; e++)
|
|
163
|
-
c += a2[e] + (e < b2.length ? b2[e] : "%s");
|
|
164
|
-
q.call(this, c + a2[d]);
|
|
165
|
-
};
|
|
166
|
-
oa(ra, q);
|
|
167
|
-
ra.prototype.name = "AssertionError";
|
|
168
|
-
var sa = function(a2, b2, c, d) {
|
|
169
|
-
var e = "Assertion failed";
|
|
170
|
-
if (c) {
|
|
171
|
-
e += ": " + c;
|
|
172
|
-
var f = d;
|
|
173
|
-
} else
|
|
174
|
-
a2 && (e += ": " + a2, f = b2);
|
|
175
|
-
throw new ra("" + e, f || []);
|
|
176
|
-
}, ta = function(a2, b2, c) {
|
|
177
|
-
a2 || sa("", null, b2, Array.prototype.slice.call(arguments, 2));
|
|
178
|
-
return a2;
|
|
179
|
-
}, ua = function(a2, b2) {
|
|
180
|
-
throw new ra("Failure" + (a2 ? ": " + a2 : ""), Array.prototype.slice.call(arguments, 1));
|
|
181
|
-
}, va = function(a2, b2, c) {
|
|
182
|
-
"string" !== typeof a2 && sa("Expected string but got %s: %s.", [ka(a2), a2], b2, Array.prototype.slice.call(arguments, 2));
|
|
183
|
-
};
|
|
184
|
-
var xa = function(a2, b2) {
|
|
185
|
-
a: {
|
|
186
|
-
try {
|
|
187
|
-
var c = a2 && a2.ownerDocument, d = c && (c.defaultView || c.parentWindow);
|
|
188
|
-
d = d || m;
|
|
189
|
-
if (d.Element && d.Location) {
|
|
190
|
-
var e = d;
|
|
191
|
-
break a;
|
|
192
|
-
}
|
|
193
|
-
} catch (g) {
|
|
194
|
-
}
|
|
195
|
-
e = null;
|
|
196
|
-
}
|
|
197
|
-
if (e && "undefined" != typeof e[b2] && (!a2 || !(a2 instanceof e[b2]) && (a2 instanceof e.Location || a2 instanceof e.Element))) {
|
|
198
|
-
e = typeof a2;
|
|
199
|
-
if ("object" == e && null != a2 || "function" == e)
|
|
200
|
-
try {
|
|
201
|
-
var f = a2.constructor.displayName || a2.constructor.name || Object.prototype.toString.call(a2);
|
|
202
|
-
} catch (g) {
|
|
203
|
-
f = "<object could not be stringified>";
|
|
204
|
-
}
|
|
205
|
-
else
|
|
206
|
-
f = void 0 === a2 ? "undefined" : null === a2 ? "null" : typeof a2;
|
|
207
|
-
ua("Argument is not a %s (or a non-Element, non-Location mock); got: %s", b2, f);
|
|
208
|
-
}
|
|
209
|
-
return a2;
|
|
210
|
-
};
|
|
211
|
-
var ya;
|
|
212
|
-
var t = function(a2, b2) {
|
|
213
|
-
this.P = a2 === za && b2 || "";
|
|
214
|
-
this.ca = Aa;
|
|
215
|
-
};
|
|
216
|
-
t.prototype.J = true;
|
|
217
|
-
t.prototype.H = function() {
|
|
218
|
-
return this.P;
|
|
219
|
-
};
|
|
220
|
-
t.prototype.toString = function() {
|
|
221
|
-
return "Const{" + this.P + "}";
|
|
222
|
-
};
|
|
223
|
-
var Ba = function(a2) {
|
|
224
|
-
if (a2 instanceof t && a2.constructor === t && a2.ca === Aa)
|
|
225
|
-
return a2.P;
|
|
226
|
-
ua("expected object of type Const, got '" + a2 + "'");
|
|
227
|
-
return "type_error:Const";
|
|
228
|
-
}, Aa = {}, za = {};
|
|
229
|
-
var v = function(a2, b2) {
|
|
230
|
-
this.N = b2 === Ca ? a2 : "";
|
|
231
|
-
};
|
|
232
|
-
v.prototype.J = true;
|
|
233
|
-
v.prototype.H = function() {
|
|
234
|
-
return this.N.toString();
|
|
235
|
-
};
|
|
236
|
-
v.prototype.toString = function() {
|
|
237
|
-
return "SafeUrl{" + this.N + "}";
|
|
238
|
-
};
|
|
239
|
-
var Da = function(a2) {
|
|
240
|
-
if (a2 instanceof v && a2.constructor === v)
|
|
241
|
-
return a2.N;
|
|
242
|
-
ua("expected object of type SafeUrl, got '" + a2 + "' of type " + ka(a2));
|
|
243
|
-
return "type_error:SafeUrl";
|
|
244
|
-
}, Ea = /^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i, Fa = function(a2) {
|
|
245
|
-
if (a2 instanceof v)
|
|
246
|
-
return a2;
|
|
247
|
-
a2 = "object" == typeof a2 && a2.J ? a2.H() : String(a2);
|
|
248
|
-
ta(Ea.test(a2), "%s does not match the safe URL pattern", a2) || (a2 = "about:invalid#zClosurez");
|
|
249
|
-
return new v(a2, Ca);
|
|
250
|
-
}, Ca = {};
|
|
251
|
-
var w = function(a2, b2, c) {
|
|
252
|
-
this.M = c === Ga ? a2 : "";
|
|
253
|
-
};
|
|
254
|
-
w.prototype.J = true;
|
|
255
|
-
w.prototype.H = function() {
|
|
256
|
-
return this.M.toString();
|
|
257
|
-
};
|
|
258
|
-
w.prototype.toString = function() {
|
|
259
|
-
return "SafeHtml{" + this.M + "}";
|
|
260
|
-
};
|
|
261
|
-
var Ha = function(a2) {
|
|
262
|
-
if (a2 instanceof w && a2.constructor === w)
|
|
263
|
-
return a2.M;
|
|
264
|
-
ua("expected object of type SafeHtml, got '" + a2 + "' of type " + ka(a2));
|
|
265
|
-
return "type_error:SafeHtml";
|
|
266
|
-
}, Ga = {}, Ia = new w(m.trustedTypes && m.trustedTypes.emptyHTML || "", 0, Ga);
|
|
267
|
-
var Ja = { MATH: true, SCRIPT: true, STYLE: true, SVG: true, TEMPLATE: true }, Ka = function(a2) {
|
|
268
|
-
var b2 = false, c;
|
|
269
|
-
return function() {
|
|
270
|
-
b2 || (c = a2(), b2 = true);
|
|
271
|
-
return c;
|
|
272
|
-
};
|
|
273
|
-
}(function() {
|
|
274
|
-
if ("undefined" === typeof document)
|
|
275
|
-
return false;
|
|
276
|
-
var a2 = document.createElement("div"), b2 = document.createElement("div");
|
|
277
|
-
b2.appendChild(document.createElement("div"));
|
|
278
|
-
a2.appendChild(b2);
|
|
279
|
-
if (!a2.firstChild)
|
|
280
|
-
return false;
|
|
281
|
-
b2 = a2.firstChild.firstChild;
|
|
282
|
-
a2.innerHTML = Ha(Ia);
|
|
283
|
-
return !b2.parentElement;
|
|
284
|
-
});
|
|
285
|
-
var x = window, z = document, La = x.location, Ma = function() {
|
|
286
|
-
}, Na = /\[native code\]/, A = function(a2, b2, c) {
|
|
287
|
-
return a2[b2] = a2[b2] || c;
|
|
288
|
-
}, Oa = function(a2) {
|
|
289
|
-
for (var b2 = 0; b2 < this.length; b2++)
|
|
290
|
-
if (this[b2] === a2)
|
|
291
|
-
return b2;
|
|
292
|
-
return -1;
|
|
293
|
-
}, Pa = function(a2) {
|
|
294
|
-
a2 = a2.sort();
|
|
295
|
-
for (var b2 = [], c = void 0, d = 0; d < a2.length; d++) {
|
|
296
|
-
var e = a2[d];
|
|
297
|
-
e != c && b2.push(e);
|
|
298
|
-
c = e;
|
|
299
|
-
}
|
|
300
|
-
return b2;
|
|
301
|
-
}, Qa = /&/g, Ra = /</g, Sa = />/g, Ua = /"/g, Va = /'/g, Wa = function(a2) {
|
|
302
|
-
return String(a2).replace(Qa, "&").replace(Ra, "<").replace(Sa, ">").replace(Ua, """).replace(Va, "'");
|
|
303
|
-
}, B = function() {
|
|
304
|
-
var a2;
|
|
305
|
-
if ((a2 = Object.create) && Na.test(a2))
|
|
306
|
-
a2 = a2(null);
|
|
307
|
-
else {
|
|
308
|
-
a2 = {};
|
|
309
|
-
for (var b2 in a2)
|
|
310
|
-
a2[b2] = void 0;
|
|
311
|
-
}
|
|
312
|
-
return a2;
|
|
313
|
-
}, C = function(a2, b2) {
|
|
314
|
-
return Object.prototype.hasOwnProperty.call(a2, b2);
|
|
315
|
-
}, Xa = function(a2) {
|
|
316
|
-
if (Na.test(Object.keys))
|
|
317
|
-
return Object.keys(a2);
|
|
318
|
-
var b2 = [], c;
|
|
319
|
-
for (c in a2)
|
|
320
|
-
C(a2, c) && b2.push(c);
|
|
321
|
-
return b2;
|
|
322
|
-
}, D = function(a2, b2) {
|
|
323
|
-
a2 = a2 || {};
|
|
324
|
-
for (var c in a2)
|
|
325
|
-
C(a2, c) && (b2[c] = a2[c]);
|
|
326
|
-
}, Ya = function(a2) {
|
|
327
|
-
return function() {
|
|
328
|
-
x.setTimeout(a2, 0);
|
|
329
|
-
};
|
|
330
|
-
}, E = function(a2, b2) {
|
|
331
|
-
if (!a2)
|
|
332
|
-
throw Error(b2 || "");
|
|
333
|
-
}, F = A(x, "gapi", {});
|
|
334
|
-
var H = function(a2, b2, c) {
|
|
335
|
-
var d = new RegExp("([#].*&|[#])" + b2 + "=([^&#]*)", "g");
|
|
336
|
-
b2 = new RegExp("([?#].*&|[?#])" + b2 + "=([^&#]*)", "g");
|
|
337
|
-
if (a2 = a2 && (d.exec(a2) || b2.exec(a2)))
|
|
338
|
-
try {
|
|
339
|
-
c = decodeURIComponent(a2[2]);
|
|
340
|
-
} catch (e) {
|
|
341
|
-
}
|
|
342
|
-
return c;
|
|
343
|
-
}, Za = new RegExp(/^/.source + /([a-zA-Z][-+.a-zA-Z0-9]*:)?/.source + /(\/\/[^\/?#]*)?/.source + /([^?#]*)?/.source + /(\?([^#]*))?/.source + /(#((#|[^#])*))?/.source + /$/.source), $a = /[\ud800-\udbff][\udc00-\udfff]|[^!-~]/g, ab = new RegExp(
|
|
344
|
-
/(%([^0-9a-fA-F%]|[0-9a-fA-F]([^0-9a-fA-F%])?)?)*/.source + /%($|[^0-9a-fA-F]|[0-9a-fA-F]($|[^0-9a-fA-F]))/.source,
|
|
345
|
-
"g"
|
|
346
|
-
), bb = /%([a-f]|[0-9a-fA-F][a-f])/g, cb = /^(https?|ftp|file|chrome-extension):$/i, I = function(a2) {
|
|
347
|
-
a2 = String(a2);
|
|
348
|
-
a2 = a2.replace($a, function(e) {
|
|
349
|
-
try {
|
|
350
|
-
return encodeURIComponent(e);
|
|
351
|
-
} catch (f) {
|
|
352
|
-
return encodeURIComponent(e.replace(/^[^%]+$/g, "�"));
|
|
353
|
-
}
|
|
354
|
-
}).replace(ab, function(e) {
|
|
355
|
-
return e.replace(/%/g, "%25");
|
|
356
|
-
}).replace(bb, function(e) {
|
|
357
|
-
return e.toUpperCase();
|
|
358
|
-
});
|
|
359
|
-
a2 = a2.match(Za) || [];
|
|
360
|
-
var b2 = B(), c = function(e) {
|
|
361
|
-
return e.replace(/\\/g, "%5C").replace(/\^/g, "%5E").replace(/`/g, "%60").replace(/\{/g, "%7B").replace(/\|/g, "%7C").replace(
|
|
362
|
-
/\}/g,
|
|
363
|
-
"%7D"
|
|
364
|
-
);
|
|
365
|
-
}, d = !!(a2[1] || "").match(cb);
|
|
366
|
-
b2.A = c((a2[1] || "") + (a2[2] || "") + (a2[3] || (a2[2] && d ? "/" : "")));
|
|
367
|
-
d = function(e) {
|
|
368
|
-
return c(e.replace(/\?/g, "%3F").replace(/#/g, "%23"));
|
|
369
|
-
};
|
|
370
|
-
b2.query = a2[5] ? [d(a2[5])] : [];
|
|
371
|
-
b2.g = a2[7] ? [d(a2[7])] : [];
|
|
372
|
-
return b2;
|
|
373
|
-
}, db = function(a2) {
|
|
374
|
-
return a2.A + (0 < a2.query.length ? "?" + a2.query.join("&") : "") + (0 < a2.g.length ? "#" + a2.g.join("&") : "");
|
|
375
|
-
}, eb = function(a2, b2) {
|
|
376
|
-
var c = [];
|
|
377
|
-
if (a2) {
|
|
378
|
-
for (var d in a2)
|
|
379
|
-
if (C(a2, d) && null != a2[d]) {
|
|
380
|
-
var e = b2 ? b2(a2[d]) : a2[d];
|
|
381
|
-
c.push(encodeURIComponent(d) + "=" + encodeURIComponent(e));
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
return c;
|
|
385
|
-
}, fb = function(a2, b2, c, d) {
|
|
386
|
-
a2 = I(a2);
|
|
387
|
-
a2.query.push.apply(a2.query, eb(b2, d));
|
|
388
|
-
a2.g.push.apply(a2.g, eb(c, d));
|
|
389
|
-
return db(a2);
|
|
390
|
-
}, gb = new RegExp(/\/?\??#?/.source + "(" + /[\/?#]/i.source + "|" + /[\uD800-\uDBFF]/i.source + "|" + /%[c-f][0-9a-f](%[89ab][0-9a-f]){0,2}(%[89ab]?)?/i.source + "|" + /%[0-9a-f]?/i.source + ")$", "i"), hb = function(a2, b2) {
|
|
391
|
-
var c = I(b2);
|
|
392
|
-
b2 = c.A;
|
|
393
|
-
c.query.length && (b2 += "?" + c.query.join(""));
|
|
394
|
-
c.g.length && (b2 += "#" + c.g.join(""));
|
|
395
|
-
var d = "";
|
|
396
|
-
2e3 < b2.length && (d = b2, b2 = b2.substr(0, 2e3), b2 = b2.replace(gb, ""), d = d.substr(b2.length));
|
|
397
|
-
var e = a2.createElement("div");
|
|
398
|
-
a2 = a2.createElement("a");
|
|
399
|
-
c = I(b2);
|
|
400
|
-
b2 = c.A;
|
|
401
|
-
c.query.length && (b2 += "?" + c.query.join(""));
|
|
402
|
-
c.g.length && (b2 += "#" + c.g.join(""));
|
|
403
|
-
b2 = new v(b2, Ca);
|
|
404
|
-
xa(a2, "HTMLAnchorElement");
|
|
405
|
-
b2 = b2 instanceof v ? b2 : Fa(b2);
|
|
406
|
-
a2.href = Da(b2);
|
|
407
|
-
e.appendChild(a2);
|
|
408
|
-
b2 = e.innerHTML;
|
|
409
|
-
c = new t(za, "Assignment to self.");
|
|
410
|
-
va(Ba(c), "must provide justification");
|
|
411
|
-
ta(!/^[\s\xa0]*$/.test(Ba(c)), "must provide non-empty justification");
|
|
412
|
-
void 0 === ya && (ya = qa("gapi#html"));
|
|
413
|
-
b2 = (c = ya) ? c.createHTML(b2) : b2;
|
|
414
|
-
b2 = new w(b2, null, Ga);
|
|
415
|
-
if (e.tagName && Ja[e.tagName.toUpperCase()])
|
|
416
|
-
throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of " + e.tagName + ".");
|
|
417
|
-
if (Ka())
|
|
418
|
-
for (; e.lastChild; )
|
|
419
|
-
e.removeChild(e.lastChild);
|
|
420
|
-
e.innerHTML = Ha(b2);
|
|
421
|
-
b2 = String(e.firstChild.href);
|
|
422
|
-
e.parentNode && e.parentNode.removeChild(e);
|
|
423
|
-
c = I(b2 + d);
|
|
424
|
-
d = c.A;
|
|
425
|
-
c.query.length && (d += "?" + c.query.join(""));
|
|
426
|
-
c.g.length && (d += "#" + c.g.join(""));
|
|
427
|
-
return d;
|
|
428
|
-
}, ib = /^https?:\/\/[^\/%\\?#\s]+\/[^\s]*$/i;
|
|
429
|
-
var jb = function(a2, b2, c, d) {
|
|
430
|
-
if (x[c + "EventListener"])
|
|
431
|
-
x[c + "EventListener"](a2, b2, false);
|
|
432
|
-
else if (x[d + "tachEvent"])
|
|
433
|
-
x[d + "tachEvent"]("on" + a2, b2);
|
|
434
|
-
}, kb = function() {
|
|
435
|
-
var a2 = z.readyState;
|
|
436
|
-
return "complete" === a2 || "interactive" === a2 && -1 == navigator.userAgent.indexOf("MSIE");
|
|
437
|
-
}, nb = function(a2) {
|
|
438
|
-
var b2 = lb;
|
|
439
|
-
if (!kb())
|
|
440
|
-
try {
|
|
441
|
-
b2();
|
|
442
|
-
} catch (c) {
|
|
443
|
-
}
|
|
444
|
-
mb(a2);
|
|
445
|
-
}, mb = function(a2) {
|
|
446
|
-
if (kb())
|
|
447
|
-
a2();
|
|
448
|
-
else {
|
|
449
|
-
var b2 = false, c = function() {
|
|
450
|
-
if (!b2)
|
|
451
|
-
return b2 = true, a2.apply(this, arguments);
|
|
452
|
-
};
|
|
453
|
-
x.addEventListener ? (x.addEventListener("load", c, false), x.addEventListener("DOMContentLoaded", c, false)) : x.attachEvent && (x.attachEvent("onreadystatechange", function() {
|
|
454
|
-
kb() && c.apply(this, arguments);
|
|
455
|
-
}), x.attachEvent("onload", c));
|
|
456
|
-
}
|
|
457
|
-
}, ob = function(a2) {
|
|
458
|
-
for (; a2.firstChild; )
|
|
459
|
-
a2.removeChild(a2.firstChild);
|
|
460
|
-
}, pb = { button: true, div: true, span: true };
|
|
461
|
-
var K;
|
|
462
|
-
K = A(x, "___jsl", B());
|
|
463
|
-
A(K, "I", 0);
|
|
464
|
-
A(K, "hel", 10);
|
|
465
|
-
var qb = function(a2) {
|
|
466
|
-
return K.dpo ? K.h : H(a2, "jsh", K.h);
|
|
467
|
-
}, rb = function(a2) {
|
|
468
|
-
var b2 = A(K, "sws", []);
|
|
469
|
-
b2.push.apply(b2, a2);
|
|
470
|
-
}, sb = function(a2) {
|
|
471
|
-
return A(K, "watt", B())[a2];
|
|
472
|
-
}, tb = function(a2) {
|
|
473
|
-
var b2 = A(K, "PQ", []);
|
|
474
|
-
K.PQ = [];
|
|
475
|
-
var c = b2.length;
|
|
476
|
-
if (0 === c)
|
|
477
|
-
a2();
|
|
478
|
-
else
|
|
479
|
-
for (var d = 0, e = function() {
|
|
480
|
-
++d === c && a2();
|
|
481
|
-
}, f = 0; f < c; f++)
|
|
482
|
-
b2[f](e);
|
|
483
|
-
}, ub = function(a2) {
|
|
484
|
-
return A(A(K, "H", B()), a2, B());
|
|
485
|
-
};
|
|
486
|
-
var vb = A(K, "perf", B()), wb = A(vb, "g", B()), xb = A(vb, "i", B());
|
|
487
|
-
A(vb, "r", []);
|
|
488
|
-
B();
|
|
489
|
-
B();
|
|
490
|
-
var yb = function(a2, b2, c) {
|
|
491
|
-
var d = vb.r;
|
|
492
|
-
"function" === typeof d ? d(a2, b2, c) : d.push([a2, b2, c]);
|
|
493
|
-
}, L = function(a2, b2, c) {
|
|
494
|
-
wb[a2] = !b2 && wb[a2] || c || (/* @__PURE__ */ new Date()).getTime();
|
|
495
|
-
yb(a2);
|
|
496
|
-
}, Ab = function(a2, b2, c) {
|
|
497
|
-
b2 && 0 < b2.length && (b2 = zb(b2), c && 0 < c.length && (b2 += "___" + zb(c)), 28 < b2.length && (b2 = b2.substr(0, 28) + (b2.length - 28)), c = b2, b2 = A(xb, "_p", B()), A(b2, c, B())[a2] = (/* @__PURE__ */ new Date()).getTime(), yb(a2, "_p", c));
|
|
498
|
-
}, zb = function(a2) {
|
|
499
|
-
return a2.join("__").replace(/\./g, "_").replace(/\-/g, "_").replace(/,/g, "_");
|
|
500
|
-
};
|
|
501
|
-
var Bb = B(), N = [], O = function(a2) {
|
|
502
|
-
throw Error("Bad hint" + (a2 ? ": " + a2 : ""));
|
|
503
|
-
};
|
|
504
|
-
N.push(["jsl", function(a2) {
|
|
505
|
-
for (var b2 in a2)
|
|
506
|
-
if (C(a2, b2)) {
|
|
507
|
-
var c = a2[b2];
|
|
508
|
-
"object" == typeof c ? K[b2] = A(K, b2, []).concat(c) : A(K, b2, c);
|
|
509
|
-
}
|
|
510
|
-
if (b2 = a2.u)
|
|
511
|
-
a2 = A(K, "us", []), a2.push(b2), (b2 = /^https:(.*)$/.exec(b2)) && a2.push("http:" + b2[1]);
|
|
512
|
-
}]);
|
|
513
|
-
var Cb = /^(\/[a-zA-Z0-9_\-]+)+$/, Db = [/\/amp\//, /\/amp$/, /^\/amp$/], Eb = /^[a-zA-Z0-9\-_\.,!]+$/, Fb = /^gapi\.loaded_[0-9]+$/, Gb = /^[a-zA-Z0-9,._-]+$/, Kb = function(a2, b2, c, d) {
|
|
514
|
-
var e = a2.split(";"), f = e.shift(), g = Bb[f], h = null;
|
|
515
|
-
g ? h = g(e, b2, c, d) : O("no hint processor for: " + f);
|
|
516
|
-
h || O("failed to generate load url");
|
|
517
|
-
b2 = h;
|
|
518
|
-
c = b2.match(Hb);
|
|
519
|
-
(d = b2.match(Ib)) && 1 === d.length && Jb.test(b2) && c && 1 === c.length || O("failed sanity: " + a2);
|
|
520
|
-
return h;
|
|
521
|
-
}, Nb = function(a2, b2, c, d) {
|
|
522
|
-
a2 = Lb(a2);
|
|
523
|
-
Fb.test(c) || O("invalid_callback");
|
|
524
|
-
b2 = Mb(b2);
|
|
525
|
-
d = d && d.length ? Mb(d) : null;
|
|
526
|
-
var e = function(f) {
|
|
527
|
-
return encodeURIComponent(f).replace(/%2C/g, ",");
|
|
528
|
-
};
|
|
529
|
-
return [encodeURIComponent(a2.pathPrefix).replace(/%2C/g, ",").replace(/%2F/g, "/"), "/k=", e(a2.version), "/m=", e(b2), d ? "/exm=" + e(d) : "", "/rt=j/sv=1/d=1/ed=1", a2.S ? "/am=" + e(a2.S) : "", a2.Z ? "/rs=" + e(a2.Z) : "", a2.aa ? "/t=" + e(a2.aa) : "", "/cb=", e(c)].join("");
|
|
530
|
-
}, Lb = function(a2) {
|
|
531
|
-
"/" !== a2.charAt(0) && O("relative path");
|
|
532
|
-
for (var b2 = a2.substring(1).split("/"), c = []; b2.length; ) {
|
|
533
|
-
a2 = b2.shift();
|
|
534
|
-
if (!a2.length || 0 == a2.indexOf("."))
|
|
535
|
-
O("empty/relative directory");
|
|
536
|
-
else if (0 < a2.indexOf("=")) {
|
|
537
|
-
b2.unshift(a2);
|
|
538
|
-
break;
|
|
539
|
-
}
|
|
540
|
-
c.push(a2);
|
|
541
|
-
}
|
|
542
|
-
a2 = {};
|
|
543
|
-
for (var d = 0, e = b2.length; d < e; ++d) {
|
|
544
|
-
var f = b2[d].split("="), g = decodeURIComponent(f[0]), h = decodeURIComponent(f[1]);
|
|
545
|
-
2 == f.length && g && h && (a2[g] = a2[g] || h);
|
|
546
|
-
}
|
|
547
|
-
b2 = "/" + c.join("/");
|
|
548
|
-
Cb.test(b2) || O("invalid_prefix");
|
|
549
|
-
c = 0;
|
|
550
|
-
for (d = Db.length; c < d; ++c)
|
|
551
|
-
Db[c].test(b2) && O("invalid_prefix");
|
|
552
|
-
c = Ob(a2, "k", true);
|
|
553
|
-
d = Ob(a2, "am");
|
|
554
|
-
e = Ob(a2, "rs");
|
|
555
|
-
a2 = Ob(a2, "t");
|
|
556
|
-
return { pathPrefix: b2, version: c, S: d, Z: e, aa: a2 };
|
|
557
|
-
}, Mb = function(a2) {
|
|
558
|
-
for (var b2 = [], c = 0, d = a2.length; c < d; ++c) {
|
|
559
|
-
var e = a2[c].replace(/\./g, "_").replace(/-/g, "_");
|
|
560
|
-
Gb.test(e) && b2.push(e);
|
|
561
|
-
}
|
|
562
|
-
return b2.join(",");
|
|
563
|
-
}, Ob = function(a2, b2, c) {
|
|
564
|
-
a2 = a2[b2];
|
|
565
|
-
!a2 && c && O("missing: " + b2);
|
|
566
|
-
if (a2) {
|
|
567
|
-
if (Eb.test(a2))
|
|
568
|
-
return a2;
|
|
569
|
-
O("invalid: " + b2);
|
|
570
|
-
}
|
|
571
|
-
return null;
|
|
572
|
-
}, Jb = /^https?:\/\/[a-z0-9_.-]+\.google(rs)?\.com(:\d+)?\/[a-zA-Z0-9_.,!=\-\/]+$/, Ib = /\/cb=/g, Hb = /\/\//g, Pb = function() {
|
|
573
|
-
var a2 = qb(La.href);
|
|
574
|
-
if (!a2)
|
|
575
|
-
throw Error("Bad hint");
|
|
576
|
-
return a2;
|
|
577
|
-
};
|
|
578
|
-
Bb.m = function(a2, b2, c, d) {
|
|
579
|
-
(a2 = a2[0]) || O("missing_hint");
|
|
580
|
-
return "https://apis.google.com" + Nb(a2, b2, c, d);
|
|
581
|
-
};
|
|
582
|
-
var Qb = decodeURI("%73cript"), Rb = /^[-+_0-9\/A-Za-z]+={0,2}$/, Sb = function(a2, b2) {
|
|
583
|
-
for (var c = [], d = 0; d < a2.length; ++d) {
|
|
584
|
-
var e = a2[d];
|
|
585
|
-
e && 0 > Oa.call(b2, e) && c.push(e);
|
|
586
|
-
}
|
|
587
|
-
return c;
|
|
588
|
-
}, Tb = function() {
|
|
589
|
-
var a2 = K.nonce;
|
|
590
|
-
return void 0 !== a2 ? a2 && a2 === String(a2) && a2.match(Rb) ? a2 : K.nonce = null : z.querySelector ? (a2 = z.querySelector("script[nonce]")) ? (a2 = a2.nonce || a2.getAttribute("nonce") || "", a2 && a2 === String(a2) && a2.match(Rb) ? K.nonce = a2 : K.nonce = null) : null : null;
|
|
591
|
-
}, Wb = function(a2) {
|
|
592
|
-
if ("loading" != z.readyState)
|
|
593
|
-
Ub(a2);
|
|
594
|
-
else {
|
|
595
|
-
var b2 = Tb(), c = "";
|
|
596
|
-
null !== b2 && (c = ' nonce="' + b2 + '"');
|
|
597
|
-
a2 = "<" + Qb + ' src="' + encodeURI(a2) + '"' + c + "></" + Qb + ">";
|
|
598
|
-
z.write(Vb ? Vb.createHTML(a2) : a2);
|
|
599
|
-
}
|
|
600
|
-
}, Ub = function(a2) {
|
|
601
|
-
var b2 = z.createElement(Qb);
|
|
602
|
-
b2.setAttribute("src", Vb ? Vb.createScriptURL(a2) : a2);
|
|
603
|
-
a2 = Tb();
|
|
604
|
-
null !== a2 && b2.setAttribute("nonce", a2);
|
|
605
|
-
b2.async = "true";
|
|
606
|
-
(a2 = z.getElementsByTagName(Qb)[0]) ? a2.parentNode.insertBefore(b2, a2) : (z.head || z.body || z.documentElement).appendChild(b2);
|
|
607
|
-
}, Xb = function(a2, b2) {
|
|
608
|
-
var c = b2 && b2._c;
|
|
609
|
-
if (c)
|
|
610
|
-
for (var d = 0; d < N.length; d++) {
|
|
611
|
-
var e = N[d][0], f = N[d][1];
|
|
612
|
-
f && C(c, e) && f(c[e], a2, b2);
|
|
613
|
-
}
|
|
614
|
-
}, Zb = function(a2, b2, c) {
|
|
615
|
-
Yb(function() {
|
|
616
|
-
var d = b2 === qb(La.href) ? A(F, "_", B()) : B();
|
|
617
|
-
d = A(ub(b2), "_", d);
|
|
618
|
-
a2(d);
|
|
619
|
-
}, c);
|
|
620
|
-
}, ac = function(a2, b2) {
|
|
621
|
-
var c = b2 || {};
|
|
622
|
-
"function" == typeof b2 && (c = {}, c.callback = b2);
|
|
623
|
-
Xb(a2, c);
|
|
624
|
-
b2 = a2 ? a2.split(":") : [];
|
|
625
|
-
var d = c.h || Pb(), e = A(K, "ah", B());
|
|
626
|
-
if (e["::"] && b2.length) {
|
|
627
|
-
a2 = [];
|
|
628
|
-
for (var f = null; f = b2.shift(); ) {
|
|
629
|
-
var g = f.split(".");
|
|
630
|
-
g = e[f] || e[g[1] && "ns:" + g[0] || ""] || d;
|
|
631
|
-
var h = a2.length && a2[a2.length - 1] || null, k = h;
|
|
632
|
-
h && h.hint == g || (k = { hint: g, V: [] }, a2.push(k));
|
|
633
|
-
k.V.push(f);
|
|
634
|
-
}
|
|
635
|
-
var l = a2.length;
|
|
636
|
-
if (1 < l) {
|
|
637
|
-
var n = c.callback;
|
|
638
|
-
n && (c.callback = function() {
|
|
639
|
-
0 == --l && n();
|
|
640
|
-
});
|
|
641
|
-
}
|
|
642
|
-
for (; b2 = a2.shift(); )
|
|
643
|
-
$b(
|
|
644
|
-
b2.V,
|
|
645
|
-
c,
|
|
646
|
-
b2.hint
|
|
647
|
-
);
|
|
648
|
-
} else
|
|
649
|
-
$b(b2 || [], c, d);
|
|
650
|
-
}, $b = function(a2, b2, c) {
|
|
651
|
-
a2 = Pa(a2) || [];
|
|
652
|
-
var d = b2.callback, e = b2.config, f = b2.timeout, g = b2.ontimeout, h = b2.onerror, k = void 0;
|
|
653
|
-
"function" == typeof h && (k = h);
|
|
654
|
-
var l = null, n = false;
|
|
655
|
-
if (f && !g || !f && g)
|
|
656
|
-
throw "Timeout requires both the timeout parameter and ontimeout parameter to be set";
|
|
657
|
-
h = A(ub(c), "r", []).sort();
|
|
658
|
-
var p = A(ub(c), "L", []).sort(), r = [].concat(h), u = function(M, ba) {
|
|
659
|
-
if (n)
|
|
660
|
-
return 0;
|
|
661
|
-
x.clearTimeout(l);
|
|
662
|
-
p.push.apply(p, y);
|
|
663
|
-
var ca = ((F || {}).config || {}).update;
|
|
664
|
-
ca ? ca(e) : e && A(K, "cu", []).push(e);
|
|
665
|
-
if (ba) {
|
|
666
|
-
Ab(
|
|
667
|
-
"me0",
|
|
668
|
-
M,
|
|
669
|
-
r
|
|
670
|
-
);
|
|
671
|
-
try {
|
|
672
|
-
Zb(ba, c, k);
|
|
673
|
-
} finally {
|
|
674
|
-
Ab("me1", M, r);
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
return 1;
|
|
678
|
-
};
|
|
679
|
-
0 < f && (l = x.setTimeout(function() {
|
|
680
|
-
n = true;
|
|
681
|
-
g();
|
|
682
|
-
}, f));
|
|
683
|
-
var y = Sb(a2, p);
|
|
684
|
-
if (y.length) {
|
|
685
|
-
y = Sb(a2, h);
|
|
686
|
-
var G = A(K, "CP", []), J = G.length;
|
|
687
|
-
G[J] = function(M) {
|
|
688
|
-
if (!M)
|
|
689
|
-
return 0;
|
|
690
|
-
Ab("ml1", y, r);
|
|
691
|
-
var ba = function(wa) {
|
|
692
|
-
G[J] = null;
|
|
693
|
-
u(y, M) && tb(function() {
|
|
694
|
-
d && d();
|
|
695
|
-
wa();
|
|
696
|
-
});
|
|
697
|
-
}, ca = function() {
|
|
698
|
-
var wa = G[J + 1];
|
|
699
|
-
wa && wa();
|
|
700
|
-
};
|
|
701
|
-
0 < J && G[J - 1] ? G[J] = function() {
|
|
702
|
-
ba(ca);
|
|
703
|
-
} : ba(ca);
|
|
704
|
-
};
|
|
705
|
-
if (y.length) {
|
|
706
|
-
var Ta = "loaded_" + K.I++;
|
|
707
|
-
F[Ta] = function(M) {
|
|
708
|
-
G[J](M);
|
|
709
|
-
F[Ta] = null;
|
|
710
|
-
};
|
|
711
|
-
a2 = Kb(c, y, "gapi." + Ta, h);
|
|
712
|
-
h.push.apply(h, y);
|
|
713
|
-
Ab("ml0", y, r);
|
|
714
|
-
b2.sync || x.___gapisync ? Wb(a2) : Ub(a2);
|
|
715
|
-
} else
|
|
716
|
-
G[J](Ma);
|
|
717
|
-
} else
|
|
718
|
-
u(y) && d && d();
|
|
719
|
-
}, Vb = qa("gapi#gapi");
|
|
720
|
-
var Yb = function(a2, b2) {
|
|
721
|
-
if (K.hee && 0 < K.hel)
|
|
722
|
-
try {
|
|
723
|
-
return a2();
|
|
724
|
-
} catch (c) {
|
|
725
|
-
b2 && b2(c), K.hel--, ac("debug_error", function() {
|
|
726
|
-
try {
|
|
727
|
-
window.___jsl.hefn(c);
|
|
728
|
-
} catch (d) {
|
|
729
|
-
throw c;
|
|
730
|
-
}
|
|
731
|
-
});
|
|
732
|
-
}
|
|
733
|
-
else
|
|
734
|
-
try {
|
|
735
|
-
return a2();
|
|
736
|
-
} catch (c) {
|
|
737
|
-
throw b2 && b2(c), c;
|
|
738
|
-
}
|
|
739
|
-
};
|
|
740
|
-
F.load = function(a2, b2) {
|
|
741
|
-
return Yb(function() {
|
|
742
|
-
return ac(a2, b2);
|
|
743
|
-
});
|
|
744
|
-
};
|
|
745
|
-
var bc = function(a2) {
|
|
746
|
-
var b2 = window.___jsl = window.___jsl || {};
|
|
747
|
-
b2[a2] = b2[a2] || [];
|
|
748
|
-
return b2[a2];
|
|
749
|
-
}, cc = function(a2) {
|
|
750
|
-
var b2 = window.___jsl = window.___jsl || {};
|
|
751
|
-
b2.cfg = !a2 && b2.cfg || {};
|
|
752
|
-
return b2.cfg;
|
|
753
|
-
}, dc = function(a2) {
|
|
754
|
-
return "object" === typeof a2 && /\[native code\]/.test(a2.push);
|
|
755
|
-
}, P = function(a2, b2, c) {
|
|
756
|
-
if (b2 && "object" === typeof b2)
|
|
757
|
-
for (var d in b2)
|
|
758
|
-
!Object.prototype.hasOwnProperty.call(b2, d) || c && "___goc" === d && "undefined" === typeof b2[d] || (a2[d] && b2[d] && "object" === typeof a2[d] && "object" === typeof b2[d] && !dc(a2[d]) && !dc(b2[d]) ? P(a2[d], b2[d]) : b2[d] && "object" === typeof b2[d] ? (a2[d] = dc(b2[d]) ? [] : {}, P(a2[d], b2[d])) : a2[d] = b2[d]);
|
|
759
|
-
}, ec = function(a2) {
|
|
760
|
-
if (a2 && !/^\s+$/.test(a2)) {
|
|
761
|
-
for (; 0 == a2.charCodeAt(a2.length - 1); )
|
|
762
|
-
a2 = a2.substring(0, a2.length - 1);
|
|
763
|
-
try {
|
|
764
|
-
var b2 = window.JSON.parse(a2);
|
|
765
|
-
} catch (c) {
|
|
766
|
-
}
|
|
767
|
-
if ("object" === typeof b2)
|
|
768
|
-
return b2;
|
|
769
|
-
try {
|
|
770
|
-
b2 = new Function("return (" + a2 + "\n)")();
|
|
771
|
-
} catch (c) {
|
|
772
|
-
}
|
|
773
|
-
if ("object" === typeof b2)
|
|
774
|
-
return b2;
|
|
775
|
-
try {
|
|
776
|
-
b2 = new Function("return ({" + a2 + "\n})")();
|
|
777
|
-
} catch (c) {
|
|
778
|
-
}
|
|
779
|
-
return "object" === typeof b2 ? b2 : {};
|
|
780
|
-
}
|
|
781
|
-
}, fc = function(a2, b2) {
|
|
782
|
-
var c = { ___goc: void 0 };
|
|
783
|
-
a2.length && a2[a2.length - 1] && Object.hasOwnProperty.call(a2[a2.length - 1], "___goc") && "undefined" === typeof a2[a2.length - 1].___goc && (c = a2.pop());
|
|
784
|
-
P(c, b2);
|
|
785
|
-
a2.push(c);
|
|
786
|
-
}, gc = function(a2) {
|
|
787
|
-
cc(true);
|
|
788
|
-
var b2 = window.___gcfg, c = bc("cu"), d = window.___gu;
|
|
789
|
-
b2 && b2 !== d && (fc(c, b2), window.___gu = b2);
|
|
790
|
-
b2 = bc("cu");
|
|
791
|
-
var e = document.scripts || document.getElementsByTagName("script") || [];
|
|
792
|
-
d = [];
|
|
793
|
-
var f = [];
|
|
794
|
-
f.push.apply(f, bc("us"));
|
|
795
|
-
for (var g = 0; g < e.length; ++g)
|
|
796
|
-
for (var h = e[g], k = 0; k < f.length; ++k)
|
|
797
|
-
h.src && 0 == h.src.indexOf(f[k]) && d.push(h);
|
|
798
|
-
0 == d.length && 0 < e.length && e[e.length - 1].src && d.push(e[e.length - 1]);
|
|
799
|
-
for (e = 0; e < d.length; ++e)
|
|
800
|
-
d[e].getAttribute("gapi_processed") || (d[e].setAttribute("gapi_processed", true), (f = d[e]) ? (g = f.nodeType, f = 3 == g || 4 == g ? f.nodeValue : f.textContent || f.innerText || f.innerHTML || "") : f = void 0, (f = ec(f)) && b2.push(f));
|
|
801
|
-
a2 && fc(c, a2);
|
|
802
|
-
d = bc("cd");
|
|
803
|
-
a2 = 0;
|
|
804
|
-
for (b2 = d.length; a2 < b2; ++a2)
|
|
805
|
-
P(cc(), d[a2], true);
|
|
806
|
-
d = bc("ci");
|
|
807
|
-
a2 = 0;
|
|
808
|
-
for (b2 = d.length; a2 < b2; ++a2)
|
|
809
|
-
P(cc(), d[a2], true);
|
|
810
|
-
a2 = 0;
|
|
811
|
-
for (b2 = c.length; a2 < b2; ++a2)
|
|
812
|
-
P(cc(), c[a2], true);
|
|
813
|
-
}, Q = function(a2) {
|
|
814
|
-
var b2 = cc();
|
|
815
|
-
if (!a2)
|
|
816
|
-
return b2;
|
|
817
|
-
a2 = a2.split("/");
|
|
818
|
-
for (var c = 0, d = a2.length; b2 && "object" === typeof b2 && c < d; ++c)
|
|
819
|
-
b2 = b2[a2[c]];
|
|
820
|
-
return c === a2.length && void 0 !== b2 ? b2 : void 0;
|
|
821
|
-
}, hc = function(a2, b2) {
|
|
822
|
-
var c;
|
|
823
|
-
if ("string" === typeof a2) {
|
|
824
|
-
var d = c = {};
|
|
825
|
-
a2 = a2.split("/");
|
|
826
|
-
for (var e = 0, f = a2.length; e < f - 1; ++e) {
|
|
827
|
-
var g = {};
|
|
828
|
-
d = d[a2[e]] = g;
|
|
829
|
-
}
|
|
830
|
-
d[a2[e]] = b2;
|
|
831
|
-
} else
|
|
832
|
-
c = a2;
|
|
833
|
-
gc(c);
|
|
834
|
-
};
|
|
835
|
-
var ic = function() {
|
|
836
|
-
var a2 = window.__GOOGLEAPIS;
|
|
837
|
-
a2 && (a2.googleapis && !a2["googleapis.config"] && (a2["googleapis.config"] = a2.googleapis), A(K, "ci", []).push(a2), window.__GOOGLEAPIS = void 0);
|
|
838
|
-
};
|
|
839
|
-
var jc = { callback: 1, clientid: 1, cookiepolicy: 1, openidrealm: -1, includegrantedscopes: -1, requestvisibleactions: 1, scope: 1 }, kc = false, lc = B(), mc = function() {
|
|
840
|
-
if (!kc) {
|
|
841
|
-
for (var a2 = document.getElementsByTagName("meta"), b2 = 0; b2 < a2.length; ++b2) {
|
|
842
|
-
var c = a2[b2].name.toLowerCase();
|
|
843
|
-
if (0 == c.lastIndexOf("google-signin-", 0)) {
|
|
844
|
-
c = c.substring(14);
|
|
845
|
-
var d = a2[b2].content;
|
|
846
|
-
jc[c] && d && (lc[c] = d);
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
if (window.self !== window.top) {
|
|
850
|
-
a2 = document.location.toString();
|
|
851
|
-
for (var e in jc)
|
|
852
|
-
0 < jc[e] && (b2 = H(a2, e, "")) && (lc[e] = b2);
|
|
853
|
-
}
|
|
854
|
-
kc = true;
|
|
855
|
-
}
|
|
856
|
-
e = B();
|
|
857
|
-
D(lc, e);
|
|
858
|
-
return e;
|
|
859
|
-
}, nc = function(a2) {
|
|
860
|
-
return !!(a2.clientid && a2.scope && a2.callback);
|
|
861
|
-
};
|
|
862
|
-
var oc = window.console, pc = function(a2) {
|
|
863
|
-
oc && oc.log && oc.log(a2);
|
|
864
|
-
};
|
|
865
|
-
var qc = function() {
|
|
866
|
-
return !!K.oa;
|
|
867
|
-
}, rc = function() {
|
|
868
|
-
};
|
|
869
|
-
var R = A(K, "rw", B()), sc = function(a2) {
|
|
870
|
-
for (var b2 in R)
|
|
871
|
-
a2(R[b2]);
|
|
872
|
-
}, tc = function(a2, b2) {
|
|
873
|
-
(a2 = R[a2]) && a2.state < b2 && (a2.state = b2);
|
|
874
|
-
};
|
|
875
|
-
var vc = /^https?:\/\/(?:\w|[\-\.])+\.google\.(?:\w|[\-:\.])+(?:\/[^\?#]*)?\/u\/(\d)\//, wc = /^https?:\/\/(?:\w|[\-\.])+\.google\.(?:\w|[\-:\.])+(?:\/[^\?#]*)?\/b\/(\d{10,21})\//, xc = function(a2) {
|
|
876
|
-
var b2 = Q("googleapis.config/sessionIndex");
|
|
877
|
-
"string" === typeof b2 && 254 < b2.length && (b2 = null);
|
|
878
|
-
null == b2 && (b2 = window.__X_GOOG_AUTHUSER);
|
|
879
|
-
"string" === typeof b2 && 254 < b2.length && (b2 = null);
|
|
880
|
-
if (null == b2) {
|
|
881
|
-
var c = window.google;
|
|
882
|
-
c && (b2 = c.authuser);
|
|
883
|
-
}
|
|
884
|
-
"string" === typeof b2 && 254 < b2.length && (b2 = null);
|
|
885
|
-
null == b2 && (a2 = a2 || window.location.href, b2 = H(a2, "authuser") || null, null == b2 && (b2 = (b2 = a2.match(vc)) ? b2[1] : null));
|
|
886
|
-
if (null == b2)
|
|
887
|
-
return null;
|
|
888
|
-
b2 = String(b2);
|
|
889
|
-
254 < b2.length && (b2 = null);
|
|
890
|
-
return b2;
|
|
891
|
-
}, yc = function(a2) {
|
|
892
|
-
var b2 = Q("googleapis.config/sessionDelegate");
|
|
893
|
-
"string" === typeof b2 && 21 < b2.length && (b2 = null);
|
|
894
|
-
null == b2 && (b2 = (a2 = (a2 || window.location.href).match(wc)) ? a2[1] : null);
|
|
895
|
-
if (null == b2)
|
|
896
|
-
return null;
|
|
897
|
-
b2 = String(b2);
|
|
898
|
-
21 < b2.length && (b2 = null);
|
|
899
|
-
return b2;
|
|
900
|
-
};
|
|
901
|
-
var zc, S, T = void 0, U = function(a2) {
|
|
902
|
-
try {
|
|
903
|
-
return m.JSON.parse.call(m.JSON, a2);
|
|
904
|
-
} catch (b2) {
|
|
905
|
-
return false;
|
|
906
|
-
}
|
|
907
|
-
}, V = function(a2) {
|
|
908
|
-
return Object.prototype.toString.call(a2);
|
|
909
|
-
}, Ac = V(0), Bc = V(/* @__PURE__ */ new Date(0)), Cc = V(true), Dc = V(""), Ec = V({}), Fc = V([]), W = function(a2, b2) {
|
|
910
|
-
if (b2) {
|
|
911
|
-
for (var c = 0, d = b2.length; c < d; ++c)
|
|
912
|
-
if (a2 === b2[c])
|
|
913
|
-
throw new TypeError("Converting circular structure to JSON");
|
|
914
|
-
}
|
|
915
|
-
d = typeof a2;
|
|
916
|
-
if ("undefined" !== d) {
|
|
917
|
-
c = Array.prototype.slice.call(b2 || [], 0);
|
|
918
|
-
c[c.length] = a2;
|
|
919
|
-
b2 = [];
|
|
920
|
-
var e = V(a2);
|
|
921
|
-
if (null != a2 && "function" === typeof a2.toJSON && (Object.prototype.hasOwnProperty.call(
|
|
922
|
-
a2,
|
|
923
|
-
"toJSON"
|
|
924
|
-
) || (e !== Fc || a2.constructor !== Array && a2.constructor !== Object) && (e !== Ec || a2.constructor !== Array && a2.constructor !== Object) && e !== Dc && e !== Ac && e !== Cc && e !== Bc))
|
|
925
|
-
return W(a2.toJSON.call(a2), c);
|
|
926
|
-
if (null == a2)
|
|
927
|
-
b2[b2.length] = "null";
|
|
928
|
-
else if (e === Ac)
|
|
929
|
-
a2 = Number(a2), isNaN(a2) || isNaN(a2 - a2) ? a2 = "null" : -0 === a2 && 0 > 1 / a2 && (a2 = "-0"), b2[b2.length] = String(a2);
|
|
930
|
-
else if (e === Cc)
|
|
931
|
-
b2[b2.length] = String(!!Number(a2));
|
|
932
|
-
else {
|
|
933
|
-
if (e === Bc)
|
|
934
|
-
return W(a2.toISOString.call(a2), c);
|
|
935
|
-
if (e === Fc && V(a2.length) === Ac) {
|
|
936
|
-
b2[b2.length] = "[";
|
|
937
|
-
var f = 0;
|
|
938
|
-
for (d = Number(a2.length) >> 0; f < d; ++f)
|
|
939
|
-
f && (b2[b2.length] = ","), b2[b2.length] = W(a2[f], c) || "null";
|
|
940
|
-
b2[b2.length] = "]";
|
|
941
|
-
} else if (e == Dc && V(a2.length) === Ac) {
|
|
942
|
-
b2[b2.length] = '"';
|
|
943
|
-
f = 0;
|
|
944
|
-
for (c = Number(a2.length) >> 0; f < c; ++f)
|
|
945
|
-
d = String.prototype.charAt.call(a2, f), e = String.prototype.charCodeAt.call(a2, f), b2[b2.length] = "\b" === d ? "\\b" : "\f" === d ? "\\f" : "\n" === d ? "\\n" : "\r" === d ? "\\r" : " " === d ? "\\t" : "\\" === d || '"' === d ? "\\" + d : 31 >= e ? "\\u" + (e + 65536).toString(16).substr(1) : 32 <= e && 65535 >= e ? d : "�";
|
|
946
|
-
b2[b2.length] = '"';
|
|
947
|
-
} else if ("object" === d) {
|
|
948
|
-
b2[b2.length] = "{";
|
|
949
|
-
d = 0;
|
|
950
|
-
for (f in a2)
|
|
951
|
-
Object.prototype.hasOwnProperty.call(
|
|
952
|
-
a2,
|
|
953
|
-
f
|
|
954
|
-
) && (e = W(a2[f], c), void 0 !== e && (d++ && (b2[b2.length] = ","), b2[b2.length] = W(f), b2[b2.length] = ":", b2[b2.length] = e));
|
|
955
|
-
b2[b2.length] = "}";
|
|
956
|
-
} else
|
|
957
|
-
return;
|
|
958
|
-
}
|
|
959
|
-
return b2.join("");
|
|
960
|
-
}
|
|
961
|
-
}, Gc = /[\0-\x07\x0b\x0e-\x1f]/, Hc = /^([^"]*"([^\\"]|\\.)*")*[^"]*"([^"\\]|\\.)*[\0-\x1f]/, Ic = /^([^"]*"([^\\"]|\\.)*")*[^"]*"([^"\\]|\\.)*\\[^\\\/"bfnrtu]/, Jc = /^([^"]*"([^\\"]|\\.)*")*[^"]*"([^"\\]|\\.)*\\u([0-9a-fA-F]{0,3}[^0-9a-fA-F])/, Kc = /"([^\0-\x1f\\"]|\\[\\\/"bfnrt]|\\u[0-9a-fA-F]{4})*"/g, Lc = /-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][-+]?[0-9]+)?/g, Mc = /[ \t\n\r]+/g, Nc = /[^"]:/, Oc = /""/g, Pc = /true|false|null/g, Qc = /00/, Rc = /[\{]([^0\}]|0[^:])/, Sc = /(^|\[)[,:]|[,:](\]|\}|[,:]|$)/, Tc = /[^\[,:][\[\{]/, Uc = /^(\{|\}|\[|\]|,|:|0)+/, Vc = /\u2028/g, Wc = /\u2029/g, Xc = function(a) {
|
|
962
|
-
a = String(a);
|
|
963
|
-
if (Gc.test(a) || Hc.test(a) || Ic.test(a) || Jc.test(a))
|
|
964
|
-
return false;
|
|
965
|
-
var b = a.replace(Kc, '""');
|
|
966
|
-
b = b.replace(Lc, "0");
|
|
967
|
-
b = b.replace(Mc, "");
|
|
968
|
-
if (Nc.test(b))
|
|
969
|
-
return false;
|
|
970
|
-
b = b.replace(Oc, "0");
|
|
971
|
-
b = b.replace(Pc, "0");
|
|
972
|
-
if (Qc.test(b) || Rc.test(b) || Sc.test(b) || Tc.test(b) || !b || (b = b.replace(Uc, "")))
|
|
973
|
-
return false;
|
|
974
|
-
a = a.replace(Vc, "\\u2028").replace(
|
|
975
|
-
Wc,
|
|
976
|
-
"\\u2029"
|
|
977
|
-
);
|
|
978
|
-
b = void 0;
|
|
979
|
-
try {
|
|
980
|
-
b = T ? [U(a)] : eval("(function (var_args) {\n return Array.prototype.slice.call(arguments, 0);\n})(\n" + a + "\n)");
|
|
981
|
-
} catch (c) {
|
|
982
|
-
return false;
|
|
983
|
-
}
|
|
984
|
-
return b && 1 === b.length ? b[0] : false;
|
|
985
|
-
}, Yc = function() {
|
|
986
|
-
var a2 = ((m.document || {}).scripts || []).length;
|
|
987
|
-
if ((void 0 === zc || void 0 === T || S !== a2) && -1 !== S) {
|
|
988
|
-
zc = T = false;
|
|
989
|
-
S = -1;
|
|
990
|
-
try {
|
|
991
|
-
try {
|
|
992
|
-
T = !!m.JSON && '{"a":[3,true,"1970-01-01T00:00:00.000Z"]}' === m.JSON.stringify.call(m.JSON, { a: [3, true, /* @__PURE__ */ new Date(0)], c: function() {
|
|
993
|
-
} }) && true === U("true") && 3 === U('[{"a":3}]')[0].a;
|
|
994
|
-
} catch (b2) {
|
|
995
|
-
}
|
|
996
|
-
zc = T && !U("[00]") && !U('"\x07"') && !U('"\\0"') && !U('"\\v"');
|
|
997
|
-
} finally {
|
|
998
|
-
S = a2;
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
}, Zc = function(a2) {
|
|
1002
|
-
if (-1 === S)
|
|
1003
|
-
return false;
|
|
1004
|
-
Yc();
|
|
1005
|
-
return (zc ? U : Xc)(a2);
|
|
1006
|
-
}, $c = function(a2) {
|
|
1007
|
-
if (-1 !== S)
|
|
1008
|
-
return Yc(), T ? m.JSON.stringify.call(m.JSON, a2) : W(a2);
|
|
1009
|
-
}, ad = !Date.prototype.toISOString || "function" !== typeof Date.prototype.toISOString || "1970-01-01T00:00:00.000Z" !== (/* @__PURE__ */ new Date(0)).toISOString(), bd = function() {
|
|
1010
|
-
var a2 = Date.prototype.getUTCFullYear.call(this);
|
|
1011
|
-
return [0 > a2 ? "-" + String(1e6 - a2).substr(1) : 9999 >= a2 ? String(1e4 + a2).substr(1) : "+" + String(1e6 + a2).substr(1), "-", String(101 + Date.prototype.getUTCMonth.call(this)).substr(1), "-", String(100 + Date.prototype.getUTCDate.call(this)).substr(1), "T", String(100 + Date.prototype.getUTCHours.call(this)).substr(1), ":", String(100 + Date.prototype.getUTCMinutes.call(this)).substr(1), ":", String(100 + Date.prototype.getUTCSeconds.call(this)).substr(1), ".", String(1e3 + Date.prototype.getUTCMilliseconds.call(this)).substr(1), "Z"].join("");
|
|
1012
|
-
};
|
|
1013
|
-
Date.prototype.toISOString = ad ? bd : Date.prototype.toISOString;
|
|
1014
|
-
var cd = function() {
|
|
1015
|
-
this.j = -1;
|
|
1016
|
-
};
|
|
1017
|
-
var dd = function() {
|
|
1018
|
-
this.j = 64;
|
|
1019
|
-
this.b = [];
|
|
1020
|
-
this.G = [];
|
|
1021
|
-
this.da = [];
|
|
1022
|
-
this.C = [];
|
|
1023
|
-
this.C[0] = 128;
|
|
1024
|
-
for (var a2 = 1; a2 < this.j; ++a2)
|
|
1025
|
-
this.C[a2] = 0;
|
|
1026
|
-
this.D = this.o = 0;
|
|
1027
|
-
this.reset();
|
|
1028
|
-
};
|
|
1029
|
-
oa(dd, cd);
|
|
1030
|
-
dd.prototype.reset = function() {
|
|
1031
|
-
this.b[0] = 1732584193;
|
|
1032
|
-
this.b[1] = 4023233417;
|
|
1033
|
-
this.b[2] = 2562383102;
|
|
1034
|
-
this.b[3] = 271733878;
|
|
1035
|
-
this.b[4] = 3285377520;
|
|
1036
|
-
this.D = this.o = 0;
|
|
1037
|
-
};
|
|
1038
|
-
var ed = function(a2, b2, c) {
|
|
1039
|
-
c || (c = 0);
|
|
1040
|
-
var d = a2.da;
|
|
1041
|
-
if ("string" === typeof b2)
|
|
1042
|
-
for (var e = 0; 16 > e; e++)
|
|
1043
|
-
d[e] = b2.charCodeAt(c) << 24 | b2.charCodeAt(c + 1) << 16 | b2.charCodeAt(c + 2) << 8 | b2.charCodeAt(c + 3), c += 4;
|
|
1044
|
-
else
|
|
1045
|
-
for (e = 0; 16 > e; e++)
|
|
1046
|
-
d[e] = b2[c] << 24 | b2[c + 1] << 16 | b2[c + 2] << 8 | b2[c + 3], c += 4;
|
|
1047
|
-
for (e = 16; 80 > e; e++) {
|
|
1048
|
-
var f = d[e - 3] ^ d[e - 8] ^ d[e - 14] ^ d[e - 16];
|
|
1049
|
-
d[e] = (f << 1 | f >>> 31) & 4294967295;
|
|
1050
|
-
}
|
|
1051
|
-
b2 = a2.b[0];
|
|
1052
|
-
c = a2.b[1];
|
|
1053
|
-
var g = a2.b[2], h = a2.b[3], k = a2.b[4];
|
|
1054
|
-
for (e = 0; 80 > e; e++) {
|
|
1055
|
-
if (40 > e)
|
|
1056
|
-
if (20 > e) {
|
|
1057
|
-
f = h ^ c & (g ^ h);
|
|
1058
|
-
var l = 1518500249;
|
|
1059
|
-
} else
|
|
1060
|
-
f = c ^ g ^ h, l = 1859775393;
|
|
1061
|
-
else
|
|
1062
|
-
60 > e ? (f = c & g | h & (c | g), l = 2400959708) : (f = c ^ g ^ h, l = 3395469782);
|
|
1063
|
-
f = (b2 << 5 | b2 >>> 27) + f + k + l + d[e] & 4294967295;
|
|
1064
|
-
k = h;
|
|
1065
|
-
h = g;
|
|
1066
|
-
g = (c << 30 | c >>> 2) & 4294967295;
|
|
1067
|
-
c = b2;
|
|
1068
|
-
b2 = f;
|
|
1069
|
-
}
|
|
1070
|
-
a2.b[0] = a2.b[0] + b2 & 4294967295;
|
|
1071
|
-
a2.b[1] = a2.b[1] + c & 4294967295;
|
|
1072
|
-
a2.b[2] = a2.b[2] + g & 4294967295;
|
|
1073
|
-
a2.b[3] = a2.b[3] + h & 4294967295;
|
|
1074
|
-
a2.b[4] = a2.b[4] + k & 4294967295;
|
|
1075
|
-
};
|
|
1076
|
-
dd.prototype.update = function(a2, b2) {
|
|
1077
|
-
if (null != a2) {
|
|
1078
|
-
void 0 === b2 && (b2 = a2.length);
|
|
1079
|
-
for (var c = b2 - this.j, d = 0, e = this.G, f = this.o; d < b2; ) {
|
|
1080
|
-
if (0 == f)
|
|
1081
|
-
for (; d <= c; )
|
|
1082
|
-
ed(this, a2, d), d += this.j;
|
|
1083
|
-
if ("string" === typeof a2)
|
|
1084
|
-
for (; d < b2; ) {
|
|
1085
|
-
if (e[f] = a2.charCodeAt(d), ++f, ++d, f == this.j) {
|
|
1086
|
-
ed(this, e);
|
|
1087
|
-
f = 0;
|
|
1088
|
-
break;
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
else
|
|
1092
|
-
for (; d < b2; )
|
|
1093
|
-
if (e[f] = a2[d], ++f, ++d, f == this.j) {
|
|
1094
|
-
ed(this, e);
|
|
1095
|
-
f = 0;
|
|
1096
|
-
break;
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
this.o = f;
|
|
1100
|
-
this.D += b2;
|
|
1101
|
-
}
|
|
1102
|
-
};
|
|
1103
|
-
dd.prototype.digest = function() {
|
|
1104
|
-
var a2 = [], b2 = 8 * this.D;
|
|
1105
|
-
56 > this.o ? this.update(this.C, 56 - this.o) : this.update(this.C, this.j - (this.o - 56));
|
|
1106
|
-
for (var c = this.j - 1; 56 <= c; c--)
|
|
1107
|
-
this.G[c] = b2 & 255, b2 /= 256;
|
|
1108
|
-
ed(this, this.G);
|
|
1109
|
-
for (c = b2 = 0; 5 > c; c++)
|
|
1110
|
-
for (var d = 24; 0 <= d; d -= 8)
|
|
1111
|
-
a2[b2] = this.b[c] >> d & 255, ++b2;
|
|
1112
|
-
return a2;
|
|
1113
|
-
};
|
|
1114
|
-
var fd = function() {
|
|
1115
|
-
this.O = new dd();
|
|
1116
|
-
};
|
|
1117
|
-
fd.prototype.reset = function() {
|
|
1118
|
-
this.O.reset();
|
|
1119
|
-
};
|
|
1120
|
-
var gd = x.crypto, hd = false, id = 0, jd = 0, kd = 1, ld = 0, md = "", nd = function(a2) {
|
|
1121
|
-
a2 = a2 || x.event;
|
|
1122
|
-
var b2 = a2.screenX + a2.clientX << 16;
|
|
1123
|
-
b2 += a2.screenY + a2.clientY;
|
|
1124
|
-
b2 *= (/* @__PURE__ */ new Date()).getTime() % 1e6;
|
|
1125
|
-
kd = kd * b2 % ld;
|
|
1126
|
-
0 < id && ++jd == id && jb("mousemove", nd, "remove", "de");
|
|
1127
|
-
}, od = function(a2) {
|
|
1128
|
-
var b2 = new fd();
|
|
1129
|
-
a2 = unescape(encodeURIComponent(a2));
|
|
1130
|
-
for (var c = [], d = 0, e = a2.length; d < e; ++d)
|
|
1131
|
-
c.push(a2.charCodeAt(d));
|
|
1132
|
-
b2.O.update(c);
|
|
1133
|
-
b2 = b2.O.digest();
|
|
1134
|
-
a2 = "";
|
|
1135
|
-
for (c = 0; c < b2.length; c++)
|
|
1136
|
-
a2 += "0123456789ABCDEF".charAt(Math.floor(b2[c] / 16)) + "0123456789ABCDEF".charAt(b2[c] % 16);
|
|
1137
|
-
return a2;
|
|
1138
|
-
};
|
|
1139
|
-
hd = !!gd && "function" == typeof gd.getRandomValues;
|
|
1140
|
-
hd || (ld = 1e6 * (screen.width * screen.width + screen.height), md = od(z.cookie + "|" + z.location + "|" + (/* @__PURE__ */ new Date()).getTime() + "|" + Math.random()), id = Q("random/maxObserveMousemove") || 0, 0 != id && jb("mousemove", nd, "add", "at"));
|
|
1141
|
-
var pd = function() {
|
|
1142
|
-
var a2 = kd;
|
|
1143
|
-
a2 += parseInt(md.substr(0, 20), 16);
|
|
1144
|
-
md = od(md);
|
|
1145
|
-
return a2 / (ld + Math.pow(16, 20));
|
|
1146
|
-
}, qd = function() {
|
|
1147
|
-
var a2 = new x.Uint32Array(1);
|
|
1148
|
-
gd.getRandomValues(a2);
|
|
1149
|
-
return Number("0." + a2[0]);
|
|
1150
|
-
};
|
|
1151
|
-
var rd = function() {
|
|
1152
|
-
var a2 = K.onl;
|
|
1153
|
-
if (!a2) {
|
|
1154
|
-
a2 = B();
|
|
1155
|
-
K.onl = a2;
|
|
1156
|
-
var b2 = B();
|
|
1157
|
-
a2.e = function(c) {
|
|
1158
|
-
var d = b2[c];
|
|
1159
|
-
d && (delete b2[c], d());
|
|
1160
|
-
};
|
|
1161
|
-
a2.a = function(c, d) {
|
|
1162
|
-
b2[c] = d;
|
|
1163
|
-
};
|
|
1164
|
-
a2.r = function(c) {
|
|
1165
|
-
delete b2[c];
|
|
1166
|
-
};
|
|
1167
|
-
}
|
|
1168
|
-
return a2;
|
|
1169
|
-
}, sd = function(a2, b2) {
|
|
1170
|
-
b2 = b2.onload;
|
|
1171
|
-
return "function" === typeof b2 ? (rd().a(a2, b2), b2) : null;
|
|
1172
|
-
}, td = function(a2) {
|
|
1173
|
-
E(/^\w+$/.test(a2), "Unsupported id - " + a2);
|
|
1174
|
-
rd();
|
|
1175
|
-
return 'onload="window.___jsl.onl.e("' + a2 + '")"';
|
|
1176
|
-
}, ud = function(a2) {
|
|
1177
|
-
rd().r(a2);
|
|
1178
|
-
};
|
|
1179
|
-
var vd = { allowtransparency: "true", frameborder: "0", hspace: "0", marginheight: "0", marginwidth: "0", scrolling: "no", style: "", tabindex: "0", vspace: "0", width: "100%" }, wd = { allowtransparency: true, onload: true }, xd = 0, yd = function(a2) {
|
|
1180
|
-
E(!a2 || ib.test(a2), "Illegal url for new iframe - " + a2);
|
|
1181
|
-
}, zd = function(a2, b2, c, d, e) {
|
|
1182
|
-
yd(c.src);
|
|
1183
|
-
var f, g = sd(d, c), h = g ? td(d) : "";
|
|
1184
|
-
try {
|
|
1185
|
-
document.all && (f = a2.createElement('<iframe frameborder="' + Wa(String(c.frameborder)) + '" scrolling="' + Wa(String(c.scrolling)) + '" ' + h + ' name="' + Wa(String(c.name)) + '"/>'));
|
|
1186
|
-
} catch (l) {
|
|
1187
|
-
} finally {
|
|
1188
|
-
f || (f = a2.createElement("iframe"), g && (f.onload = function() {
|
|
1189
|
-
f.onload = null;
|
|
1190
|
-
g.call(this);
|
|
1191
|
-
}, ud(d)));
|
|
1192
|
-
}
|
|
1193
|
-
f.setAttribute("ng-non-bindable", "");
|
|
1194
|
-
for (var k in c)
|
|
1195
|
-
a2 = c[k], "style" === k && "object" === typeof a2 ? D(a2, f.style) : wd[k] || f.setAttribute(k, String(a2));
|
|
1196
|
-
(k = e && e.beforeNode || null) || e && e.dontclear || ob(b2);
|
|
1197
|
-
b2.insertBefore(f, k);
|
|
1198
|
-
f = k ? k.previousSibling : b2.lastChild;
|
|
1199
|
-
c.allowtransparency && (f.allowTransparency = true);
|
|
1200
|
-
return f;
|
|
1201
|
-
};
|
|
1202
|
-
var Ad = /^:[\w]+$/, Bd = /:([a-zA-Z_]+):/g, Cd = function() {
|
|
1203
|
-
var a2 = xc() || "0", b2 = yc();
|
|
1204
|
-
var c = xc(void 0) || a2;
|
|
1205
|
-
var d = yc(void 0), e = "";
|
|
1206
|
-
c && (e += "u/" + encodeURIComponent(String(c)) + "/");
|
|
1207
|
-
d && (e += "b/" + encodeURIComponent(String(d)) + "/");
|
|
1208
|
-
c = e || null;
|
|
1209
|
-
(e = (d = false === Q("isLoggedIn")) ? "_/im/" : "") && (c = "");
|
|
1210
|
-
var f = Q("iframes/:socialhost:"), g = Q("iframes/:im_socialhost:");
|
|
1211
|
-
return { socialhost: f, ctx_socialhost: d ? g : f, session_index: a2, session_delegate: b2, session_prefix: c, im_prefix: e };
|
|
1212
|
-
}, Dd = function(a2, b2) {
|
|
1213
|
-
return Cd()[b2] || "";
|
|
1214
|
-
}, Ed = function(a2) {
|
|
1215
|
-
return function(b2, c) {
|
|
1216
|
-
return a2 ? Cd()[c] || a2[c] || "" : Cd()[c] || "";
|
|
1217
|
-
};
|
|
1218
|
-
};
|
|
1219
|
-
var Fd = function(a2) {
|
|
1220
|
-
var b2;
|
|
1221
|
-
a2.match(/^https?%3A/i) && (b2 = decodeURIComponent(a2));
|
|
1222
|
-
return hb(document, b2 ? b2 : a2);
|
|
1223
|
-
}, Gd = function(a2) {
|
|
1224
|
-
a2 = a2 || "canonical";
|
|
1225
|
-
for (var b2 = document.getElementsByTagName("link"), c = 0, d = b2.length; c < d; c++) {
|
|
1226
|
-
var e = b2[c], f = e.getAttribute("rel");
|
|
1227
|
-
if (f && f.toLowerCase() == a2 && (e = e.getAttribute("href")) && (e = Fd(e)) && null != e.match(/^https?:\/\/[\w\-_\.]+/i))
|
|
1228
|
-
return e;
|
|
1229
|
-
}
|
|
1230
|
-
return window.location.href;
|
|
1231
|
-
};
|
|
1232
|
-
var Hd = { se: "0" }, Id = { post: true }, Jd = { style: "position:absolute;top:-10000px;width:450px;margin:0px;border-style:none" }, Kd = "onPlusOne _ready _close _open _resizeMe _renderstart oncircled drefresh erefresh".split(" "), Ld = A(K, "WI", B()), Md = function(a2, b2, c) {
|
|
1233
|
-
var d;
|
|
1234
|
-
var e = {};
|
|
1235
|
-
var f = d = a2;
|
|
1236
|
-
"plus" == a2 && b2.action && (d = a2 + "_" + b2.action, f = a2 + "/" + b2.action);
|
|
1237
|
-
(d = Q("iframes/" + d + "/url")) || (d = ":im_socialhost:/:session_prefix::im_prefix:_/widget/render/" + f + "?usegapi=1");
|
|
1238
|
-
for (var g in Hd)
|
|
1239
|
-
e[g] = g + "/" + (b2[g] || Hd[g]) + "/";
|
|
1240
|
-
e = hb(z, d.replace(
|
|
1241
|
-
Bd,
|
|
1242
|
-
Ed(e)
|
|
1243
|
-
));
|
|
1244
|
-
g = "iframes/" + a2 + "/params/";
|
|
1245
|
-
f = {};
|
|
1246
|
-
D(b2, f);
|
|
1247
|
-
(d = Q("lang") || Q("gwidget/lang")) && (f.hl = d);
|
|
1248
|
-
Id[a2] || (f.origin = window.location.origin || window.location.protocol + "//" + window.location.host);
|
|
1249
|
-
f.exp = Q(g + "exp");
|
|
1250
|
-
if (g = Q(g + "location"))
|
|
1251
|
-
for (d = 0; d < g.length; d++) {
|
|
1252
|
-
var h = g[d];
|
|
1253
|
-
f[h] = x.location[h];
|
|
1254
|
-
}
|
|
1255
|
-
switch (a2) {
|
|
1256
|
-
case "plus":
|
|
1257
|
-
case "follow":
|
|
1258
|
-
g = f.href;
|
|
1259
|
-
d = b2.action ? void 0 : "publisher";
|
|
1260
|
-
g = (g = "string" == typeof g ? g : void 0) ? Fd(g) : Gd(d);
|
|
1261
|
-
f.url = g;
|
|
1262
|
-
delete f.href;
|
|
1263
|
-
break;
|
|
1264
|
-
case "plusone":
|
|
1265
|
-
g = (g = b2.href) ? Fd(g) : Gd();
|
|
1266
|
-
f.url = g;
|
|
1267
|
-
g = b2.db;
|
|
1268
|
-
d = Q();
|
|
1269
|
-
null == g && d && (g = d.db, null == g && (g = d.gwidget && d.gwidget.db));
|
|
1270
|
-
f.db = g || void 0;
|
|
1271
|
-
g = b2.ecp;
|
|
1272
|
-
d = Q();
|
|
1273
|
-
null == g && d && (g = d.ecp, null == g && (g = d.gwidget && d.gwidget.ecp));
|
|
1274
|
-
f.ecp = g || void 0;
|
|
1275
|
-
delete f.href;
|
|
1276
|
-
break;
|
|
1277
|
-
case "signin":
|
|
1278
|
-
f.url = Gd();
|
|
1279
|
-
}
|
|
1280
|
-
K.ILI && (f.iloader = "1");
|
|
1281
|
-
delete f["data-onload"];
|
|
1282
|
-
delete f.rd;
|
|
1283
|
-
for (var k in Hd)
|
|
1284
|
-
f[k] && delete f[k];
|
|
1285
|
-
f.gsrc = Q("iframes/:source:");
|
|
1286
|
-
k = Q("inline/css");
|
|
1287
|
-
"undefined" !== typeof k && 0 < c && k >= c && (f.ic = "1");
|
|
1288
|
-
k = /^#|^fr-/;
|
|
1289
|
-
c = {};
|
|
1290
|
-
for (var l in f)
|
|
1291
|
-
C(f, l) && k.test(l) && (c[l.replace(k, "")] = f[l], delete f[l]);
|
|
1292
|
-
l = "q" == Q("iframes/" + a2 + "/params/si") ? f : c;
|
|
1293
|
-
k = mc();
|
|
1294
|
-
for (var n in k)
|
|
1295
|
-
!C(k, n) || C(f, n) || C(c, n) || (l[n] = k[n]);
|
|
1296
|
-
n = [].concat(Kd);
|
|
1297
|
-
(l = Q("iframes/" + a2 + "/methods")) && "object" === typeof l && Na.test(l.push) && (n = n.concat(l));
|
|
1298
|
-
for (var p in b2)
|
|
1299
|
-
C(b2, p) && /^on/.test(p) && ("plus" != a2 || "onconnect" != p) && (n.push(p), delete f[p]);
|
|
1300
|
-
delete f.callback;
|
|
1301
|
-
c._methods = n.join(",");
|
|
1302
|
-
return fb(e, f, c);
|
|
1303
|
-
}, Nd = ["style", "data-gapiscan"], Pd = function(a2) {
|
|
1304
|
-
for (var b2 = B(), c = 0 != a2.nodeName.toLowerCase().indexOf("g:"), d = 0, e = a2.attributes.length; d < e; d++) {
|
|
1305
|
-
var f = a2.attributes[d], g = f.name, h = f.value;
|
|
1306
|
-
0 <= Oa.call(
|
|
1307
|
-
Nd,
|
|
1308
|
-
g
|
|
1309
|
-
) || c && 0 != g.indexOf("data-") || "null" === h || "specified" in f && !f.specified || (c && (g = g.substr(5)), b2[g.toLowerCase()] = h);
|
|
1310
|
-
}
|
|
1311
|
-
a2 = a2.style;
|
|
1312
|
-
(c = Od(a2 && a2.height)) && (b2.height = String(c));
|
|
1313
|
-
(a2 = Od(a2 && a2.width)) && (b2.width = String(a2));
|
|
1314
|
-
return b2;
|
|
1315
|
-
}, Od = function(a2) {
|
|
1316
|
-
var b2 = void 0;
|
|
1317
|
-
"number" === typeof a2 ? b2 = a2 : "string" === typeof a2 && (b2 = parseInt(a2, 10));
|
|
1318
|
-
return b2;
|
|
1319
|
-
}, Rd = function() {
|
|
1320
|
-
var a2 = K.drw;
|
|
1321
|
-
sc(function(b2) {
|
|
1322
|
-
if (a2 !== b2.id && 4 != b2.state && "share" != b2.type) {
|
|
1323
|
-
var c = b2.id, d = b2.type, e = b2.url;
|
|
1324
|
-
b2 = b2.userParams;
|
|
1325
|
-
var f = z.getElementById(c);
|
|
1326
|
-
if (f) {
|
|
1327
|
-
var g = Md(d, b2, 0);
|
|
1328
|
-
g ? (f = f.parentNode, e.replace(/#.*/, "").replace(/(\?|&)ic=1/, "") !== g.replace(/#.*/, "").replace(/(\?|&)ic=1/, "") && (b2.dontclear = true, b2.rd = true, b2.ri = true, b2.type = d, Qd(f, b2), (d = R[f.lastChild.id]) && (d.oid = c), tc(c, 4))) : delete R[c];
|
|
1329
|
-
} else
|
|
1330
|
-
delete R[c];
|
|
1331
|
-
}
|
|
1332
|
-
});
|
|
1333
|
-
};
|
|
1334
|
-
var Sd, Td, X, Ud, Vd, Wd = /(?:^|\s)g-((\S)*)(?:$|\s)/, Xd = { plusone: true, autocomplete: true, profile: true, signin: true, signin2: true };
|
|
1335
|
-
Sd = A(K, "SW", B());
|
|
1336
|
-
Td = A(K, "SA", B());
|
|
1337
|
-
X = A(K, "SM", B());
|
|
1338
|
-
Ud = A(K, "FW", []);
|
|
1339
|
-
Vd = null;
|
|
1340
|
-
var Zd = function(a2, b2) {
|
|
1341
|
-
Yd(void 0, false, a2, b2);
|
|
1342
|
-
}, Yd = function(a2, b2, c, d) {
|
|
1343
|
-
L("ps0", true);
|
|
1344
|
-
c = ("string" === typeof c ? document.getElementById(c) : c) || z;
|
|
1345
|
-
var e = z.documentMode;
|
|
1346
|
-
if (c.querySelectorAll && (!e || 8 < e)) {
|
|
1347
|
-
e = d ? [d] : Xa(Sd).concat(Xa(Td)).concat(Xa(X));
|
|
1348
|
-
for (var f = [], g = 0; g < e.length; g++) {
|
|
1349
|
-
var h = e[g];
|
|
1350
|
-
f.push(".g-" + h, "g\\:" + h);
|
|
1351
|
-
}
|
|
1352
|
-
e = c.querySelectorAll(f.join(","));
|
|
1353
|
-
} else
|
|
1354
|
-
e = c.getElementsByTagName("*");
|
|
1355
|
-
c = B();
|
|
1356
|
-
for (f = 0; f < e.length; f++) {
|
|
1357
|
-
g = e[f];
|
|
1358
|
-
var k = g;
|
|
1359
|
-
h = d;
|
|
1360
|
-
var l = k.nodeName.toLowerCase(), n = void 0;
|
|
1361
|
-
if (k.getAttribute("data-gapiscan"))
|
|
1362
|
-
h = null;
|
|
1363
|
-
else {
|
|
1364
|
-
var p = l.indexOf("g:");
|
|
1365
|
-
0 == p ? n = l.substr(2) : (p = (p = String(k.className || k.getAttribute("class"))) && Wd.exec(p)) && (n = p[1]);
|
|
1366
|
-
h = !n || !(Sd[n] || Td[n] || X[n]) || h && n !== h ? null : n;
|
|
1367
|
-
}
|
|
1368
|
-
h && (Xd[h] || 0 == g.nodeName.toLowerCase().indexOf("g:") || 0 != Xa(Pd(g)).length) && (g.setAttribute("data-gapiscan", true), A(c, h, []).push(g));
|
|
1369
|
-
}
|
|
1370
|
-
if (b2)
|
|
1371
|
-
for (var r in c)
|
|
1372
|
-
for (b2 = c[r], d = 0; d < b2.length; d++)
|
|
1373
|
-
b2[d].setAttribute("data-onload", true);
|
|
1374
|
-
for (var u in c)
|
|
1375
|
-
Ud.push(u);
|
|
1376
|
-
L("ps1", true);
|
|
1377
|
-
if ((r = Ud.join(":")) || a2)
|
|
1378
|
-
try {
|
|
1379
|
-
F.load(r, a2);
|
|
1380
|
-
} catch (G) {
|
|
1381
|
-
pc(G);
|
|
1382
|
-
return;
|
|
1383
|
-
}
|
|
1384
|
-
if ($d(Vd || {}))
|
|
1385
|
-
for (var y in c) {
|
|
1386
|
-
a2 = c[y];
|
|
1387
|
-
u = 0;
|
|
1388
|
-
for (b2 = a2.length; u < b2; u++)
|
|
1389
|
-
a2[u].removeAttribute("data-gapiscan");
|
|
1390
|
-
ae(y);
|
|
1391
|
-
}
|
|
1392
|
-
else {
|
|
1393
|
-
d = [];
|
|
1394
|
-
for (y in c)
|
|
1395
|
-
for (a2 = c[y], u = 0, b2 = a2.length; u < b2; u++)
|
|
1396
|
-
e = a2[u], be(y, e, Pd(e), d, b2);
|
|
1397
|
-
ce(r, d);
|
|
1398
|
-
}
|
|
1399
|
-
}, de = function(a2) {
|
|
1400
|
-
var b2 = A(F, a2, {});
|
|
1401
|
-
b2.go || (b2.go = function(c) {
|
|
1402
|
-
return Zd(c, a2);
|
|
1403
|
-
}, b2.render = function(c, d) {
|
|
1404
|
-
d = d || {};
|
|
1405
|
-
d.type = a2;
|
|
1406
|
-
return Qd(c, d);
|
|
1407
|
-
});
|
|
1408
|
-
}, ee = function(a2) {
|
|
1409
|
-
Sd[a2] = true;
|
|
1410
|
-
}, fe = function(a2) {
|
|
1411
|
-
Td[a2] = true;
|
|
1412
|
-
}, ge = function(a2) {
|
|
1413
|
-
X[a2] = true;
|
|
1414
|
-
};
|
|
1415
|
-
var ae = function(a2, b2) {
|
|
1416
|
-
var c = sb(a2);
|
|
1417
|
-
b2 && c ? (c(b2), (c = b2.iframeNode) && c.setAttribute("data-gapiattached", true)) : F.load(a2, function() {
|
|
1418
|
-
var d = sb(a2), e = b2 && b2.iframeNode, f = b2 && b2.userParams;
|
|
1419
|
-
e && d ? (d(b2), e.setAttribute("data-gapiattached", true)) : (d = F[a2].go, "signin2" == a2 ? d(e, f) : d(e && e.parentNode, f));
|
|
1420
|
-
});
|
|
1421
|
-
}, $d = function() {
|
|
1422
|
-
return false;
|
|
1423
|
-
}, ce = function() {
|
|
1424
|
-
}, be = function(a2, b2, c, d, e, f, g) {
|
|
1425
|
-
switch (he(b2, a2, f)) {
|
|
1426
|
-
case 0:
|
|
1427
|
-
a2 = X[a2] ? a2 + "_annotation" : a2;
|
|
1428
|
-
d = {};
|
|
1429
|
-
d.iframeNode = b2;
|
|
1430
|
-
d.userParams = c;
|
|
1431
|
-
ae(a2, d);
|
|
1432
|
-
break;
|
|
1433
|
-
case 1:
|
|
1434
|
-
if (b2.parentNode) {
|
|
1435
|
-
for (var h in c) {
|
|
1436
|
-
if (f = C(c, h))
|
|
1437
|
-
f = c[h], f = !!f && "object" === typeof f && (!f.toString || f.toString === Object.prototype.toString || f.toString === Array.prototype.toString);
|
|
1438
|
-
if (f)
|
|
1439
|
-
try {
|
|
1440
|
-
c[h] = $c(c[h]);
|
|
1441
|
-
} catch (y) {
|
|
1442
|
-
delete c[h];
|
|
1443
|
-
}
|
|
1444
|
-
}
|
|
1445
|
-
f = true;
|
|
1446
|
-
c.dontclear && (f = false);
|
|
1447
|
-
delete c.dontclear;
|
|
1448
|
-
rc();
|
|
1449
|
-
h = Md(a2, c, e);
|
|
1450
|
-
e = g || {};
|
|
1451
|
-
e.allowPost = 1;
|
|
1452
|
-
e.attributes = Jd;
|
|
1453
|
-
e.dontclear = !f;
|
|
1454
|
-
g = {};
|
|
1455
|
-
g.userParams = c;
|
|
1456
|
-
g.url = h;
|
|
1457
|
-
g.type = a2;
|
|
1458
|
-
if (c.rd)
|
|
1459
|
-
var k = b2;
|
|
1460
|
-
else
|
|
1461
|
-
k = document.createElement("div"), b2.setAttribute("data-gapistub", true), k.style.cssText = "position:absolute;width:450px;left:-10000px;", b2.parentNode.insertBefore(k, b2);
|
|
1462
|
-
g.siteElement = k;
|
|
1463
|
-
k.id || (b2 = k, A(Ld, a2, 0), f = "___" + a2 + "_" + Ld[a2]++, b2.id = f);
|
|
1464
|
-
b2 = B();
|
|
1465
|
-
b2[">type"] = a2;
|
|
1466
|
-
D(c, b2);
|
|
1467
|
-
f = h;
|
|
1468
|
-
c = k;
|
|
1469
|
-
h = e || {};
|
|
1470
|
-
b2 = h.attributes || {};
|
|
1471
|
-
E(!(h.allowPost || h.forcePost) || !b2.onload, "onload is not supported by post iframe (allowPost or forcePost)");
|
|
1472
|
-
e = b2 = f;
|
|
1473
|
-
Ad.test(b2) && (e = Q("iframes/" + e.substring(1) + "/url"), E(!!e, "Unknown iframe url config for - " + b2));
|
|
1474
|
-
f = hb(z, e.replace(Bd, Dd));
|
|
1475
|
-
b2 = c.ownerDocument || z;
|
|
1476
|
-
k = 0;
|
|
1477
|
-
do
|
|
1478
|
-
e = h.id || ["I", xd++, "_", (/* @__PURE__ */ new Date()).getTime()].join("");
|
|
1479
|
-
while (b2.getElementById(e) && 5 > ++k);
|
|
1480
|
-
E(5 > k, "Error creating iframe id");
|
|
1481
|
-
k = {};
|
|
1482
|
-
var l = {};
|
|
1483
|
-
b2.documentMode && 9 > b2.documentMode && (k.hostiemode = b2.documentMode);
|
|
1484
|
-
D(h.queryParams || {}, k);
|
|
1485
|
-
D(h.fragmentParams || {}, l);
|
|
1486
|
-
var n = h.pfname;
|
|
1487
|
-
var p = B();
|
|
1488
|
-
Q("iframes/dropLegacyIdParam") || (p.id = e);
|
|
1489
|
-
p._gfid = e;
|
|
1490
|
-
p.parent = b2.location.protocol + "//" + b2.location.host;
|
|
1491
|
-
var r = H(b2.location.href, "parent");
|
|
1492
|
-
n = n || "";
|
|
1493
|
-
!n && r && (r = H(b2.location.href, "_gfid", "") || H(b2.location.href, "id", ""), n = H(b2.location.href, "pfname", ""), n = r ? n + "/" + r : "");
|
|
1494
|
-
n || (r = Zc(H(b2.location.href, "jcp", ""))) && "object" == typeof r && (n = (n = r.id) ? r.pfname + "/" + n : "");
|
|
1495
|
-
p.pfname = n;
|
|
1496
|
-
h.connectWithJsonParam && (r = {}, r.jcp = $c(p), p = r);
|
|
1497
|
-
r = H(f, "rpctoken") || k.rpctoken || l.rpctoken;
|
|
1498
|
-
r || (r = h.rpctoken || String(Math.round(1e8 * (hd ? qd() : pd()))), p.rpctoken = r);
|
|
1499
|
-
h.rpctoken = r;
|
|
1500
|
-
D(p, h.connectWithQueryParams ? k : l);
|
|
1501
|
-
r = b2.location.href;
|
|
1502
|
-
p = B();
|
|
1503
|
-
(n = H(r, "_bsh", K.bsh)) && (p._bsh = n);
|
|
1504
|
-
(r = qb(r)) && (p.jsh = r);
|
|
1505
|
-
h.hintInFragment ? D(p, l) : D(p, k);
|
|
1506
|
-
f = fb(f, k, l, h.paramsSerializer);
|
|
1507
|
-
l = B();
|
|
1508
|
-
D(vd, l);
|
|
1509
|
-
D(h.attributes, l);
|
|
1510
|
-
l.name = l.id = e;
|
|
1511
|
-
l.src = f;
|
|
1512
|
-
h.eurl = f;
|
|
1513
|
-
k = h || {};
|
|
1514
|
-
p = !!k.allowPost;
|
|
1515
|
-
if (k.forcePost || p && 2e3 < f.length) {
|
|
1516
|
-
k = I(f);
|
|
1517
|
-
l.src = "";
|
|
1518
|
-
h.dropDataPostorigin || (l["data-postorigin"] = f);
|
|
1519
|
-
f = zd(b2, c, l, e);
|
|
1520
|
-
if (-1 != navigator.userAgent.indexOf("WebKit")) {
|
|
1521
|
-
var u = f.contentWindow.document;
|
|
1522
|
-
u.open();
|
|
1523
|
-
l = u.createElement("div");
|
|
1524
|
-
p = {};
|
|
1525
|
-
r = e + "_inner";
|
|
1526
|
-
p.name = r;
|
|
1527
|
-
p.src = "";
|
|
1528
|
-
p.style = "display:none";
|
|
1529
|
-
zd(b2, l, p, r, h);
|
|
1530
|
-
}
|
|
1531
|
-
l = (h = k.query[0]) ? h.split("&") : [];
|
|
1532
|
-
h = [];
|
|
1533
|
-
for (p = 0; p < l.length; p++)
|
|
1534
|
-
r = l[p].split("=", 2), h.push([decodeURIComponent(r[0]), decodeURIComponent(r[1])]);
|
|
1535
|
-
k.query = [];
|
|
1536
|
-
l = db(k);
|
|
1537
|
-
E(ib.test(l), "Invalid URL: " + l);
|
|
1538
|
-
k = b2.createElement("form");
|
|
1539
|
-
k.method = "POST";
|
|
1540
|
-
k.target = e;
|
|
1541
|
-
k.style.display = "none";
|
|
1542
|
-
e = l instanceof v ? l : Fa(l);
|
|
1543
|
-
xa(k, "HTMLFormElement").action = Da(e);
|
|
1544
|
-
for (e = 0; e < h.length; e++)
|
|
1545
|
-
l = b2.createElement("input"), l.type = "hidden", l.name = h[e][0], l.value = h[e][1], k.appendChild(l);
|
|
1546
|
-
c.appendChild(k);
|
|
1547
|
-
k.submit();
|
|
1548
|
-
k.parentNode.removeChild(k);
|
|
1549
|
-
u && u.close();
|
|
1550
|
-
u = f;
|
|
1551
|
-
} else
|
|
1552
|
-
u = zd(b2, c, l, e, h);
|
|
1553
|
-
g.iframeNode = u;
|
|
1554
|
-
g.id = u.getAttribute("id");
|
|
1555
|
-
u = g.id;
|
|
1556
|
-
c = B();
|
|
1557
|
-
c.id = u;
|
|
1558
|
-
c.userParams = g.userParams;
|
|
1559
|
-
c.url = g.url;
|
|
1560
|
-
c.type = g.type;
|
|
1561
|
-
c.state = 1;
|
|
1562
|
-
R[u] = c;
|
|
1563
|
-
u = g;
|
|
1564
|
-
} else
|
|
1565
|
-
u = null;
|
|
1566
|
-
u && ((g = u.id) && d.push(g), ae(a2, u));
|
|
1567
|
-
}
|
|
1568
|
-
}, he = function(a2, b2, c) {
|
|
1569
|
-
if (a2 && 1 === a2.nodeType && b2) {
|
|
1570
|
-
if (c)
|
|
1571
|
-
return 1;
|
|
1572
|
-
if (X[b2]) {
|
|
1573
|
-
if (pb[a2.nodeName.toLowerCase()])
|
|
1574
|
-
return (a2 = a2.innerHTML) && a2.replace(/^[\s\xa0]+|[\s\xa0]+$/g, "") ? 0 : 1;
|
|
1575
|
-
} else {
|
|
1576
|
-
if (Td[b2])
|
|
1577
|
-
return 0;
|
|
1578
|
-
if (Sd[b2])
|
|
1579
|
-
return 1;
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
return null;
|
|
1583
|
-
}, Qd = function(a2, b2) {
|
|
1584
|
-
var c = b2.type;
|
|
1585
|
-
delete b2.type;
|
|
1586
|
-
var d = ("string" === typeof a2 ? document.getElementById(a2) : a2) || void 0;
|
|
1587
|
-
if (d) {
|
|
1588
|
-
a2 = {};
|
|
1589
|
-
for (var e in b2)
|
|
1590
|
-
C(b2, e) && (a2[e.toLowerCase()] = b2[e]);
|
|
1591
|
-
a2.rd = 1;
|
|
1592
|
-
(b2 = !!a2.ri) && delete a2.ri;
|
|
1593
|
-
e = [];
|
|
1594
|
-
be(c, d, a2, e, 0, b2, void 0);
|
|
1595
|
-
ce(c, e);
|
|
1596
|
-
} else
|
|
1597
|
-
pc("string" === "gapi." + c + ".render: missing element " + typeof a2 ? a2 : "");
|
|
1598
|
-
};
|
|
1599
|
-
A(F, "platform", {}).go = Zd;
|
|
1600
|
-
$d = function(a2) {
|
|
1601
|
-
for (var b2 = ["_c", "jsl", "h"], c = 0; c < b2.length && a2; c++)
|
|
1602
|
-
a2 = a2[b2[c]];
|
|
1603
|
-
b2 = qb(La.href);
|
|
1604
|
-
return !a2 || 0 != a2.indexOf("n;") && 0 != b2.indexOf("n;") && a2 !== b2;
|
|
1605
|
-
};
|
|
1606
|
-
ce = function(a2, b2) {
|
|
1607
|
-
ie(a2, b2);
|
|
1608
|
-
};
|
|
1609
|
-
var lb = function(a2) {
|
|
1610
|
-
Yd(a2, true);
|
|
1611
|
-
}, je = function(a2, b2) {
|
|
1612
|
-
b2 = b2 || [];
|
|
1613
|
-
for (var c = 0; c < b2.length; ++c)
|
|
1614
|
-
a2(b2[c]);
|
|
1615
|
-
for (a2 = 0; a2 < b2.length; a2++)
|
|
1616
|
-
de(b2[a2]);
|
|
1617
|
-
};
|
|
1618
|
-
N.push(["platform", function(a2, b2, c) {
|
|
1619
|
-
Vd = c;
|
|
1620
|
-
b2 && Ud.push(b2);
|
|
1621
|
-
je(ee, a2);
|
|
1622
|
-
je(fe, c._c.annotation);
|
|
1623
|
-
je(ge, c._c.bimodal);
|
|
1624
|
-
ic();
|
|
1625
|
-
gc();
|
|
1626
|
-
if ("explicit" != Q("parsetags")) {
|
|
1627
|
-
rb(a2);
|
|
1628
|
-
nc(mc()) && !Q("disableRealtimeCallback") && rc();
|
|
1629
|
-
if (c && (a2 = c.callback)) {
|
|
1630
|
-
var d = Ya(a2);
|
|
1631
|
-
delete c.callback;
|
|
1632
|
-
}
|
|
1633
|
-
nb(function() {
|
|
1634
|
-
lb(d);
|
|
1635
|
-
});
|
|
1636
|
-
}
|
|
1637
|
-
}]);
|
|
1638
|
-
F._pl = true;
|
|
1639
|
-
var ke = function(a2) {
|
|
1640
|
-
a2 = (a2 = R[a2]) ? a2.oid : void 0;
|
|
1641
|
-
if (a2) {
|
|
1642
|
-
var b2 = z.getElementById(a2);
|
|
1643
|
-
b2 && b2.parentNode.removeChild(b2);
|
|
1644
|
-
delete R[a2];
|
|
1645
|
-
ke(a2);
|
|
1646
|
-
}
|
|
1647
|
-
};
|
|
1648
|
-
var le = /^\{h:'/, me = /^!_/, ne = "", ie = function(a2, b2) {
|
|
1649
|
-
function c() {
|
|
1650
|
-
jb("message", d, "remove", "de");
|
|
1651
|
-
}
|
|
1652
|
-
function d(f) {
|
|
1653
|
-
var g = f.data, h = f.origin;
|
|
1654
|
-
if (oe(g, b2)) {
|
|
1655
|
-
var k = e;
|
|
1656
|
-
e = false;
|
|
1657
|
-
k && L("rqe");
|
|
1658
|
-
pe(a2, function() {
|
|
1659
|
-
k && L("rqd");
|
|
1660
|
-
c();
|
|
1661
|
-
for (var l = A(K, "RPMQ", []), n = 0; n < l.length; n++)
|
|
1662
|
-
l[n]({ data: g, origin: h });
|
|
1663
|
-
});
|
|
1664
|
-
}
|
|
1665
|
-
}
|
|
1666
|
-
if (0 !== b2.length) {
|
|
1667
|
-
ne = H(La.href, "pfname", "");
|
|
1668
|
-
var e = true;
|
|
1669
|
-
jb("message", d, "add", "at");
|
|
1670
|
-
ac(a2, c);
|
|
1671
|
-
}
|
|
1672
|
-
}, oe = function(a2, b2) {
|
|
1673
|
-
a2 = String(a2);
|
|
1674
|
-
if (le.test(a2))
|
|
1675
|
-
return true;
|
|
1676
|
-
var c = false;
|
|
1677
|
-
me.test(a2) && (c = true, a2 = a2.substr(2));
|
|
1678
|
-
if (!/^\{/.test(a2))
|
|
1679
|
-
return false;
|
|
1680
|
-
var d = Zc(a2);
|
|
1681
|
-
if (!d)
|
|
1682
|
-
return false;
|
|
1683
|
-
a2 = d.f;
|
|
1684
|
-
if (d.s && a2 && -1 != Oa.call(b2, a2)) {
|
|
1685
|
-
if ("_renderstart" === d.s || d.s === ne + "/" + a2 + "::_renderstart") {
|
|
1686
|
-
if (d = d.a && d.a[c ? 0 : 1], b2 = z.getElementById(a2), tc(a2, 2), d && b2 && d.width && d.height) {
|
|
1687
|
-
a: {
|
|
1688
|
-
c = b2.parentNode;
|
|
1689
|
-
a2 = d || {};
|
|
1690
|
-
if (qc()) {
|
|
1691
|
-
var e = b2.id;
|
|
1692
|
-
if (e) {
|
|
1693
|
-
d = (d = R[e]) ? d.state : void 0;
|
|
1694
|
-
if (1 === d || 4 === d)
|
|
1695
|
-
break a;
|
|
1696
|
-
ke(e);
|
|
1697
|
-
}
|
|
1698
|
-
}
|
|
1699
|
-
(d = c.nextSibling) && d.getAttribute && d.getAttribute("data-gapistub") && (c.parentNode.removeChild(d), c.style.cssText = "");
|
|
1700
|
-
d = a2.width;
|
|
1701
|
-
var f = a2.height, g = c.style;
|
|
1702
|
-
g.textIndent = "0";
|
|
1703
|
-
g.margin = "0";
|
|
1704
|
-
g.padding = "0";
|
|
1705
|
-
g.background = "transparent";
|
|
1706
|
-
g.borderStyle = "none";
|
|
1707
|
-
g.cssFloat = "none";
|
|
1708
|
-
g.styleFloat = "none";
|
|
1709
|
-
g.lineHeight = "normal";
|
|
1710
|
-
g.fontSize = "1px";
|
|
1711
|
-
g.verticalAlign = "baseline";
|
|
1712
|
-
c = c.style;
|
|
1713
|
-
c.display = "inline-block";
|
|
1714
|
-
g = b2.style;
|
|
1715
|
-
g.position = "static";
|
|
1716
|
-
g.left = "0";
|
|
1717
|
-
g.top = "0";
|
|
1718
|
-
g.visibility = "visible";
|
|
1719
|
-
d && (c.width = g.width = d + "px");
|
|
1720
|
-
f && (c.height = g.height = f + "px");
|
|
1721
|
-
a2.verticalAlign && (c.verticalAlign = a2.verticalAlign);
|
|
1722
|
-
e && tc(e, 3);
|
|
1723
|
-
}
|
|
1724
|
-
b2["data-csi-wdt"] = (/* @__PURE__ */ new Date()).getTime();
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
|
-
return true;
|
|
1728
|
-
}
|
|
1729
|
-
return false;
|
|
1730
|
-
}, pe = function(a2, b2) {
|
|
1731
|
-
ac(a2, b2);
|
|
1732
|
-
};
|
|
1733
|
-
var qe = function(a2, b2) {
|
|
1734
|
-
this.L = a2;
|
|
1735
|
-
a2 = b2 || {};
|
|
1736
|
-
this.fa = Number(a2.maxAge) || 0;
|
|
1737
|
-
this.U = a2.domain;
|
|
1738
|
-
this.X = a2.path;
|
|
1739
|
-
this.ga = !!a2.secure;
|
|
1740
|
-
};
|
|
1741
|
-
qe.prototype.read = function() {
|
|
1742
|
-
for (var a2 = this.L + "=", b2 = document.cookie.split(/;\s*/), c = 0; c < b2.length; ++c) {
|
|
1743
|
-
var d = b2[c];
|
|
1744
|
-
if (0 == d.indexOf(a2))
|
|
1745
|
-
return d.substr(a2.length);
|
|
1746
|
-
}
|
|
1747
|
-
};
|
|
1748
|
-
qe.prototype.write = function(a2, b2) {
|
|
1749
|
-
if (!re.test(this.L))
|
|
1750
|
-
throw "Invalid cookie name";
|
|
1751
|
-
if (!se.test(a2))
|
|
1752
|
-
throw "Invalid cookie value";
|
|
1753
|
-
a2 = this.L + "=" + a2;
|
|
1754
|
-
this.U && (a2 += ";domain=" + this.U);
|
|
1755
|
-
this.X && (a2 += ";path=" + this.X);
|
|
1756
|
-
b2 = "number" === typeof b2 ? b2 : this.fa;
|
|
1757
|
-
if (0 <= b2) {
|
|
1758
|
-
var c = /* @__PURE__ */ new Date();
|
|
1759
|
-
c.setSeconds(c.getSeconds() + b2);
|
|
1760
|
-
a2 += ";expires=" + c.toUTCString();
|
|
1761
|
-
}
|
|
1762
|
-
this.ga && (a2 += ";secure");
|
|
1763
|
-
document.cookie = a2;
|
|
1764
|
-
return true;
|
|
1765
|
-
};
|
|
1766
|
-
qe.prototype.clear = function() {
|
|
1767
|
-
this.write("", 0);
|
|
1768
|
-
};
|
|
1769
|
-
var se = /^[-+/_=.:|%&a-zA-Z0-9@]*$/, re = /^[A-Z_][A-Z0-9_]{0,63}$/;
|
|
1770
|
-
qe.iterate = function(a2) {
|
|
1771
|
-
for (var b2 = document.cookie.split(/;\s*/), c = 0; c < b2.length; ++c) {
|
|
1772
|
-
var d = b2[c].split("="), e = d.shift();
|
|
1773
|
-
a2(e, d.join("="));
|
|
1774
|
-
}
|
|
1775
|
-
};
|
|
1776
|
-
var te = function(a2) {
|
|
1777
|
-
this.B = a2;
|
|
1778
|
-
};
|
|
1779
|
-
te.prototype.read = function() {
|
|
1780
|
-
if (Y.hasOwnProperty(this.B))
|
|
1781
|
-
return Y[this.B];
|
|
1782
|
-
};
|
|
1783
|
-
te.prototype.write = function(a2) {
|
|
1784
|
-
Y[this.B] = a2;
|
|
1785
|
-
return true;
|
|
1786
|
-
};
|
|
1787
|
-
te.prototype.clear = function() {
|
|
1788
|
-
delete Y[this.B];
|
|
1789
|
-
};
|
|
1790
|
-
var Y = {};
|
|
1791
|
-
te.iterate = function(a2) {
|
|
1792
|
-
for (var b2 in Y)
|
|
1793
|
-
Y.hasOwnProperty(b2) && a2(b2, Y[b2]);
|
|
1794
|
-
};
|
|
1795
|
-
var ue = "https:" === window.location.protocol, ve = ue || "http:" === window.location.protocol ? qe : te, we = function(a2) {
|
|
1796
|
-
var b2 = a2.substr(1), c = "", d = window.location.hostname;
|
|
1797
|
-
if ("" !== b2) {
|
|
1798
|
-
c = parseInt(b2, 10);
|
|
1799
|
-
if (isNaN(c))
|
|
1800
|
-
return null;
|
|
1801
|
-
b2 = d.split(".");
|
|
1802
|
-
if (b2.length < c - 1)
|
|
1803
|
-
return null;
|
|
1804
|
-
b2.length == c - 1 && (d = "." + d);
|
|
1805
|
-
} else
|
|
1806
|
-
d = "";
|
|
1807
|
-
return { i: "S" == a2.charAt(0), domain: d, l: c };
|
|
1808
|
-
}, xe = function() {
|
|
1809
|
-
var a2, b2 = null;
|
|
1810
|
-
ve.iterate(function(c, d) {
|
|
1811
|
-
0 === c.indexOf("G_AUTHUSER_") && (c = we(c.substring(11)), !a2 || c.i && !a2.i || c.i == a2.i && c.l > a2.l) && (a2 = c, b2 = d);
|
|
1812
|
-
});
|
|
1813
|
-
return { ea: a2, F: b2 };
|
|
1814
|
-
};
|
|
1815
|
-
var ye = function(a2) {
|
|
1816
|
-
if (0 !== a2.indexOf("GCSC"))
|
|
1817
|
-
return null;
|
|
1818
|
-
var b2 = { W: false };
|
|
1819
|
-
a2 = a2.substr(4);
|
|
1820
|
-
if (!a2)
|
|
1821
|
-
return b2;
|
|
1822
|
-
var c = a2.charAt(0);
|
|
1823
|
-
a2 = a2.substr(1);
|
|
1824
|
-
var d = a2.lastIndexOf("_");
|
|
1825
|
-
if (-1 == d)
|
|
1826
|
-
return b2;
|
|
1827
|
-
var e = we(a2.substr(d + 1));
|
|
1828
|
-
if (null == e)
|
|
1829
|
-
return b2;
|
|
1830
|
-
a2 = a2.substring(0, d);
|
|
1831
|
-
if ("_" !== a2.charAt(0))
|
|
1832
|
-
return b2;
|
|
1833
|
-
d = "E" === c && e.i;
|
|
1834
|
-
return !d && ("U" !== c || e.i) || d && !ue ? b2 : { W: true, i: d, ja: a2.substr(1), domain: e.domain, l: e.l };
|
|
1835
|
-
}, ze = function(a2) {
|
|
1836
|
-
if (!a2)
|
|
1837
|
-
return [];
|
|
1838
|
-
a2 = a2.split("=");
|
|
1839
|
-
return a2[1] ? a2[1].split("|") : [];
|
|
1840
|
-
}, Ae = function(a2) {
|
|
1841
|
-
a2 = a2.split(":");
|
|
1842
|
-
return {
|
|
1843
|
-
clientId: a2[0].split("=")[1],
|
|
1844
|
-
ia: ze(a2[1]),
|
|
1845
|
-
la: ze(a2[2]),
|
|
1846
|
-
ka: ze(a2[3])
|
|
1847
|
-
};
|
|
1848
|
-
}, Be = function() {
|
|
1849
|
-
var a2 = xe(), b2 = a2.ea;
|
|
1850
|
-
a2 = a2.F;
|
|
1851
|
-
if (null !== a2) {
|
|
1852
|
-
var c;
|
|
1853
|
-
ve.iterate(function(f, g) {
|
|
1854
|
-
(f = ye(f)) && f.W && f.i == b2.i && f.l == b2.l && (c = g);
|
|
1855
|
-
});
|
|
1856
|
-
if (c) {
|
|
1857
|
-
var d = Ae(c), e = d && d.ia[Number(a2)];
|
|
1858
|
-
d = d && d.clientId;
|
|
1859
|
-
if (e)
|
|
1860
|
-
return { F: a2, ha: e, clientId: d };
|
|
1861
|
-
}
|
|
1862
|
-
}
|
|
1863
|
-
return null;
|
|
1864
|
-
};
|
|
1865
|
-
var Z = function() {
|
|
1866
|
-
this.T = Ce;
|
|
1867
|
-
};
|
|
1868
|
-
Z.prototype.$ = function() {
|
|
1869
|
-
this.K || (this.v = 0, this.K = true, this.Y());
|
|
1870
|
-
};
|
|
1871
|
-
Z.prototype.Y = function() {
|
|
1872
|
-
this.K && (this.T() ? this.v = this.R : this.v = Math.min(2 * (this.v || this.R), 120), window.setTimeout(na(this.Y, this), 1e3 * this.v));
|
|
1873
|
-
};
|
|
1874
|
-
Z.prototype.v = 0;
|
|
1875
|
-
Z.prototype.R = 2;
|
|
1876
|
-
Z.prototype.T = null;
|
|
1877
|
-
Z.prototype.K = false;
|
|
1878
|
-
var Ee = null;
|
|
1879
|
-
qc = function() {
|
|
1880
|
-
return K.oa = true;
|
|
1881
|
-
};
|
|
1882
|
-
rc = function() {
|
|
1883
|
-
K.oa = true;
|
|
1884
|
-
var a2 = Be();
|
|
1885
|
-
(a2 = a2 && a2.F) && hc("googleapis.config/sessionIndex", a2);
|
|
1886
|
-
Ee || (Ee = A(K, "ss", new Z()));
|
|
1887
|
-
a2 = Ee;
|
|
1888
|
-
a2.$ && a2.$();
|
|
1889
|
-
};
|
|
1890
|
-
var Ce = function() {
|
|
1891
|
-
var a2 = Be(), b2 = a2 && a2.ha || null, c = a2 && a2.clientId;
|
|
1892
|
-
ac("auth", { callback: function() {
|
|
1893
|
-
var d = x.gapi.auth, e = { client_id: c, session_state: b2 };
|
|
1894
|
-
d.checkSessionState(e, function(f) {
|
|
1895
|
-
var g = e.session_state, h = Q("isLoggedIn");
|
|
1896
|
-
f = Q("debug/forceIm") ? false : g && f || !g && !f;
|
|
1897
|
-
if (h = h != f)
|
|
1898
|
-
hc("isLoggedIn", f), rc(), Rd(), f || ((f = d.signOut) ? f() : (f = d.setToken) && f(null));
|
|
1899
|
-
f = mc();
|
|
1900
|
-
var k = Q("savedUserState");
|
|
1901
|
-
g = d._guss(f.cookiepolicy);
|
|
1902
|
-
k = k != g && "undefined" != typeof k;
|
|
1903
|
-
hc("savedUserState", g);
|
|
1904
|
-
(h || k) && nc(f) && !Q("disableRealtimeCallback") && d._pimf(
|
|
1905
|
-
f,
|
|
1906
|
-
true
|
|
1907
|
-
);
|
|
1908
|
-
});
|
|
1909
|
-
} });
|
|
1910
|
-
return true;
|
|
1911
|
-
};
|
|
1912
|
-
L("bs0", true, window.gapi._bs);
|
|
1913
|
-
L("bs1", true);
|
|
1914
|
-
delete window.gapi._bs;
|
|
1915
|
-
}).call(globalThis);
|
|
1916
|
-
gapi.load("", { callback: window["gapi_onload"], _c: { "jsl": { "ci": { "deviceType": "desktop", "oauth-flow": { "authUrl": "https://accounts.google.com/o/oauth2/auth", "proxyUrl": "https://accounts.google.com/o/oauth2/postmessageRelay", "disableOpt": true, "idpIframeUrl": "https://accounts.google.com/o/oauth2/iframe", "usegapi": false }, "debug": { "reportExceptionRate": 0.05, "forceIm": false, "rethrowException": false, "host": "https://apis.google.com" }, "enableMultilogin": true, "googleapis.config": { "auth": { "useFirstPartyAuthV2": true } }, "isPlusUser": false, "inline": { "css": 1 }, "disableRealtimeCallback": false, "drive_share": { "skipInitCommand": true }, "csi": { "rate": 0.01 }, "client": { "cors": false }, "isLoggedIn": true, "signInDeprecation": { "rate": 0 }, "include_granted_scopes": true, "llang": "pt", "iframes": { "youtube": { "params": { "location": ["search", "hash"] }, "url": ":socialhost:/:session_prefix:_/widget/render/youtube?usegapi=1", "methods": ["scroll", "openwindow"] }, "ytsubscribe": { "url": "https://www.youtube.com/subscribe_embed?usegapi=1" }, "plus_circle": { "params": { "url": "" }, "url": ":socialhost:/:session_prefix::se:_/widget/plus/circle?usegapi=1" }, "plus_share": { "params": { "url": "" }, "url": ":socialhost:/:session_prefix::se:_/+1/sharebutton?plusShare=true&usegapi=1" }, "rbr_s": { "params": { "url": "" }, "url": ":socialhost:/:session_prefix::se:_/widget/render/recobarsimplescroller" }, ":source:": "3p", "playemm": { "url": "https://play.google.com/work/embedded/search?usegapi=1&usegapi=1" }, "savetoandroidpay": { "url": "https://pay.google.com/gp/v/widget/save" }, "blogger": { "params": { "location": ["search", "hash"] }, "url": ":socialhost:/:session_prefix:_/widget/render/blogger?usegapi=1", "methods": ["scroll", "openwindow"] }, "evwidget": { "params": { "url": "" }, "url": ":socialhost:/:session_prefix:_/events/widget?usegapi=1" }, "partnersbadge": { "url": "https://www.gstatic.com/partners/badge/templates/badge.html?usegapi=1" }, "dataconnector": { "url": "https://dataconnector.corp.google.com/:session_prefix:ui/widgetview?usegapi=1" }, "surveyoptin": { "url": "https://www.google.com/shopping/customerreviews/optin?usegapi=1" }, ":socialhost:": "https://apis.google.com", "shortlists": { "url": "" }, "hangout": { "url": "https://talkgadget.google.com/:session_prefix:talkgadget/_/widget" }, "plus_followers": { "params": { "url": "" }, "url": ":socialhost:/_/im/_/widget/render/plus/followers?usegapi=1" }, "post": { "params": { "url": "" }, "url": ":socialhost:/:session_prefix::im_prefix:_/widget/render/post?usegapi=1" }, ":gplus_url:": "https://plus.google.com", "signin": { "params": { "url": "" }, "url": ":socialhost:/:session_prefix:_/widget/render/signin?usegapi=1", "methods": ["onauth"] }, "rbr_i": { "params": { "url": "" }, "url": ":socialhost:/:session_prefix::se:_/widget/render/recobarinvitation" }, "share": { "url": ":socialhost:/:session_prefix::im_prefix:_/widget/render/share?usegapi=1" }, "plusone": { "params": { "count": "", "size": "", "url": "" }, "url": ":socialhost:/:session_prefix::se:_/+1/fastbutton?usegapi=1" }, "comments": { "params": { "location": ["search", "hash"] }, "url": ":socialhost:/:session_prefix:_/widget/render/comments?usegapi=1", "methods": ["scroll", "openwindow"] }, ":im_socialhost:": "https://plus.googleapis.com", "backdrop": { "url": "https://clients3.google.com/cast/chromecast/home/widget/backdrop?usegapi=1" }, "visibility": { "params": { "url": "" }, "url": ":socialhost:/:session_prefix:_/widget/render/visibility?usegapi=1" }, "autocomplete": { "params": { "url": "" }, "url": ":socialhost:/:session_prefix:_/widget/render/autocomplete" }, "additnow": { "url": "https://apis.google.com/marketplace/button?usegapi=1", "methods": ["launchurl"] }, ":signuphost:": "https://plus.google.com", "ratingbadge": { "url": "https://www.google.com/shopping/customerreviews/badge?usegapi=1" }, "appcirclepicker": { "url": ":socialhost:/:session_prefix:_/widget/render/appcirclepicker" }, "follow": { "url": ":socialhost:/:session_prefix:_/widget/render/follow?usegapi=1" }, "community": { "url": ":ctx_socialhost:/:session_prefix::im_prefix:_/widget/render/community?usegapi=1" }, "sharetoclassroom": { "url": "https://classroom.google.com/sharewidget?usegapi=1" }, "ytshare": { "params": { "url": "" }, "url": ":socialhost:/:session_prefix:_/widget/render/ytshare?usegapi=1" }, "plus": { "url": ":socialhost:/:session_prefix:_/widget/render/badge?usegapi=1" }, "family_creation": { "params": { "url": "" }, "url": "https://families.google.com/webcreation?usegapi=1&usegapi=1" }, "commentcount": { "url": ":socialhost:/:session_prefix:_/widget/render/commentcount?usegapi=1" }, "configurator": { "url": ":socialhost:/:session_prefix:_/plusbuttonconfigurator?usegapi=1" }, "zoomableimage": { "url": "https://ssl.gstatic.com/microscope/embed/" }, "appfinder": { "url": "https://workspace.google.com/:session_prefix:marketplace/appfinder?usegapi=1" }, "savetowallet": { "url": "https://pay.google.com/gp/v/widget/save" }, "person": { "url": ":socialhost:/:session_prefix:_/widget/render/person?usegapi=1" }, "savetodrive": { "url": "https://drive.google.com/savetodrivebutton?usegapi=1", "methods": ["save"] }, "page": { "url": ":socialhost:/:session_prefix:_/widget/render/page?usegapi=1" }, "card": { "url": ":socialhost:/:session_prefix:_/hovercard/card" } } }, "h": "m;/_/scs/apps-static/_/js/k=oz.gapi.pt_BR.l4Bv_WkVC6g.O/am=wQE/d=1/ct=zgms/rs=AGLTcCOuH5S2uqmF6E8zOW7n3yiqiwhzNQ/m=__features__", "u": "https://apis.google.com/js/platform.js", "hee": true, "fp": "821a251b140e4add32f87f4a7a08f044a59aa0e9", "dpo": false }, "platform": ["additnow", "backdrop", "blogger", "comments", "commentcount", "community", "donation", "family_creation", "follow", "hangout", "health", "page", "partnersbadge", "person", "playemm", "playreview", "plus", "plusone", "post", "ratingbadge", "savetoandroidpay", "savetodrive", "savetowallet", "sharetoclassroom", "shortlists", "signin2", "surveyoptin", "visibility", "youtube", "ytsubscribe", "zoomableimage"], "fp": "821a251b140e4add32f87f4a7a08f044a59aa0e9", "annotation": ["interactivepost", "recobar", "signin2", "autocomplete", "profile"], "bimodal": ["signin", "share"] } });
|
|
1917
|
-
const _hoisted_1$1 = { class: "listbox-subtitle" };
|
|
1918
|
-
const _hoisted_2$1 = {
|
|
1919
|
-
key: 0,
|
|
1920
|
-
class: "listbox-wrapper"
|
|
1921
|
-
};
|
|
1922
|
-
const _hoisted_3$1 = { key: 1 };
|
|
1923
|
-
const _hoisted_4$1 = { key: 0 };
|
|
1924
|
-
const _hoisted_5$1 = { class: "file-item" };
|
|
1925
|
-
const _hoisted_6 = {
|
|
1926
|
-
key: 0,
|
|
1927
|
-
src: _imports_1,
|
|
1928
|
-
alt: "Google Sheets icon",
|
|
1929
|
-
class: "file-icon"
|
|
1930
|
-
};
|
|
1931
|
-
const _hoisted_7 = { class: "sheet-selection" };
|
|
1932
|
-
const _hoisted_8 = {
|
|
1933
|
-
key: 1,
|
|
1934
|
-
class: "modal"
|
|
1935
|
-
};
|
|
1936
|
-
const _hoisted_9 = { class: "modal-content" };
|
|
1937
|
-
const _hoisted_10 = { class: "breadcrumb" };
|
|
1938
|
-
const _hoisted_11 = { key: 0 };
|
|
1939
|
-
const _hoisted_12 = { key: 1 };
|
|
1940
|
-
const _hoisted_13 = ["onClick"];
|
|
1941
|
-
const _hoisted_14 = { class: "grid-container" };
|
|
1942
|
-
const _hoisted_15 = ["onDblclick", "onClick"];
|
|
1943
|
-
const _hoisted_16 = {
|
|
1944
|
-
key: 0,
|
|
1945
|
-
src: _imports_1,
|
|
1946
|
-
alt: "Google Sheets icon",
|
|
1947
|
-
class: "file-icon"
|
|
1948
|
-
};
|
|
1949
|
-
const _hoisted_17 = {
|
|
1950
|
-
key: 1,
|
|
1951
|
-
class: "material-icons"
|
|
1952
|
-
};
|
|
1953
|
-
const _hoisted_18 = { class: "pagination-buttons" };
|
|
1954
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1955
|
-
__name: "googleSheet",
|
|
1956
|
-
props: {
|
|
1957
|
-
modelValue: {
|
|
1958
|
-
type: Object,
|
|
1959
|
-
required: true
|
|
1960
|
-
}
|
|
1961
|
-
},
|
|
1962
|
-
emits: ["update:modelValue"],
|
|
1963
|
-
setup(__props, { emit: __emit }) {
|
|
1964
|
-
const files = ref([]);
|
|
1965
|
-
const isAuthenticated = ref(false);
|
|
1966
|
-
const dataLoaded = ref(false);
|
|
1967
|
-
const id_token = ref("");
|
|
1968
|
-
const accessToken = ref("");
|
|
1969
|
-
const data = ref(null);
|
|
1970
|
-
const nextPageToken = ref(null);
|
|
1971
|
-
const showFiles = ref(false);
|
|
1972
|
-
const currentPage = ref(1);
|
|
1973
|
-
const selectedFolderId = ref("");
|
|
1974
|
-
const selectedFolders = ref([]);
|
|
1975
|
-
const selectedFile = ref(null);
|
|
1976
|
-
const selectedGoogleSheet = ref(null);
|
|
1977
|
-
const tokenAvailableInBackend = ref(false);
|
|
1978
|
-
const openDrawer = () => {
|
|
1979
|
-
fetchInitialFiles();
|
|
1980
|
-
showFiles.value = true;
|
|
1981
|
-
};
|
|
1982
|
-
const props = __props;
|
|
1983
|
-
const googleSheetSettings = ref(props.modelValue);
|
|
1984
|
-
const closeDrawer = () => {
|
|
1985
|
-
showFiles.value = false;
|
|
1986
|
-
nextPageToken.value = null;
|
|
1987
|
-
files.value = [];
|
|
1988
|
-
};
|
|
1989
|
-
const pageResults = ref({});
|
|
1990
|
-
const googleSheetDetails = ref(null);
|
|
1991
|
-
const selectedSheet = computed(() => {
|
|
1992
|
-
var _a;
|
|
1993
|
-
return (_a = googleSheetDetails.value) == null ? void 0 : _a.sheets.find(
|
|
1994
|
-
(sheet) => sheet.name === googleSheetSettings.value.worksheet_name
|
|
1995
|
-
);
|
|
1996
|
-
});
|
|
1997
|
-
const fetchSheetDetails = async (spreadsheetId) => {
|
|
1998
|
-
if (!accessToken.value)
|
|
1999
|
-
return;
|
|
2000
|
-
const url = `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheetId}`;
|
|
2001
|
-
const headers = new Headers({
|
|
2002
|
-
Authorization: `Bearer ${accessToken.value}`
|
|
2003
|
-
});
|
|
2004
|
-
console.log("fetching sheet details");
|
|
2005
|
-
try {
|
|
2006
|
-
const response = await fetch(url, { headers });
|
|
2007
|
-
if (!response.ok) {
|
|
2008
|
-
throw new Error("Failed to fetch spreadsheet details");
|
|
2009
|
-
}
|
|
2010
|
-
const spreadsheetData = await response.json();
|
|
2011
|
-
const sheetsInfo = spreadsheetData.sheets.map((sheet) => ({
|
|
2012
|
-
id: sheet.properties.sheetId,
|
|
2013
|
-
// The Sheets API uses 'sheetId' to refer to a sheet's unique identifier
|
|
2014
|
-
name: sheet.properties.title,
|
|
2015
|
-
rows: sheet.properties.gridProperties.rowCount,
|
|
2016
|
-
columns: sheet.properties.gridProperties.columnCount
|
|
2017
|
-
}));
|
|
2018
|
-
googleSheetDetails.value = {
|
|
2019
|
-
id: spreadsheetData.spreadsheetId,
|
|
2020
|
-
name: spreadsheetData.properties.title,
|
|
2021
|
-
sheets: sheetsInfo
|
|
2022
|
-
};
|
|
2023
|
-
selectedGoogleSheet.value = googleSheetDetails.value;
|
|
2024
|
-
} catch (error) {
|
|
2025
|
-
console.error("Error fetching sheet details:", error);
|
|
2026
|
-
}
|
|
2027
|
-
};
|
|
2028
|
-
const fetchDriveFiles = async (nextToken = null) => {
|
|
2029
|
-
if (!accessToken.value)
|
|
2030
|
-
return;
|
|
2031
|
-
let folder_id = "root";
|
|
2032
|
-
if (selectedFolders.value.length > 0) {
|
|
2033
|
-
folder_id = selectedFolders.value[selectedFolders.value.length - 1].id;
|
|
2034
|
-
}
|
|
2035
|
-
let query = `(mimeType='application/vnd.google-apps.folder' or mimeType='application/vnd.google-apps.spreadsheet') and trashed=false and '${folder_id}' in parents`;
|
|
2036
|
-
const fields = "nextPageToken,files(id,name,mimeType,parents)";
|
|
2037
|
-
const pageSize = 20;
|
|
2038
|
-
let url = `https://www.googleapis.com/drive/v3/files?pageSize=${pageSize}&fields=${encodeURIComponent(
|
|
2039
|
-
fields
|
|
2040
|
-
)}&q=${encodeURIComponent(query)}`;
|
|
2041
|
-
if (nextToken) {
|
|
2042
|
-
url += `&pageToken=${nextToken}`;
|
|
2043
|
-
}
|
|
2044
|
-
const headers = new Headers({
|
|
2045
|
-
Authorization: `Bearer ${accessToken.value}`
|
|
2046
|
-
});
|
|
2047
|
-
try {
|
|
2048
|
-
if (Object.prototype.hasOwnProperty.call(pageResults.value, currentPage.value)) {
|
|
2049
|
-
files.value = pageResults.value[currentPage.value];
|
|
2050
|
-
return;
|
|
2051
|
-
}
|
|
2052
|
-
const response = await fetch(url, { headers });
|
|
2053
|
-
if (!response.ok) {
|
|
2054
|
-
throw new Error("Failed to fetch files");
|
|
2055
|
-
}
|
|
2056
|
-
const data2 = await response.json();
|
|
2057
|
-
files.value = nextToken ? [...files.value, ...data2.files] : data2.files;
|
|
2058
|
-
pageResults.value[currentPage.value] = data2.files;
|
|
2059
|
-
nextPageToken.value = data2.nextPageToken || null;
|
|
2060
|
-
} catch (error) {
|
|
2061
|
-
console.error("Error fetching files from Google Drive:", error);
|
|
2062
|
-
}
|
|
2063
|
-
};
|
|
2064
|
-
const setBackendToken = () => {
|
|
2065
|
-
googleSheetSettings.value.access_token = accessToken.value;
|
|
2066
|
-
};
|
|
2067
|
-
const signIn = async () => {
|
|
2068
|
-
try {
|
|
2069
|
-
const authInstance = gapi.auth2.getAuthInstance();
|
|
2070
|
-
const googleUser = await authInstance.signIn({
|
|
2071
|
-
prompt: "select_account"
|
|
2072
|
-
// This line forces account selection
|
|
2073
|
-
});
|
|
2074
|
-
const authResponse = googleUser.getAuthResponse();
|
|
2075
|
-
id_token.value = authResponse.id_token;
|
|
2076
|
-
accessToken.value = authResponse.access_token;
|
|
2077
|
-
setBackendToken();
|
|
2078
|
-
} catch (error) {
|
|
2079
|
-
console.error("Error during sign in:", error);
|
|
2080
|
-
}
|
|
2081
|
-
};
|
|
2082
|
-
const displayedFiles = computed(() => {
|
|
2083
|
-
return pageResults.value[currentPage.value] || [];
|
|
2084
|
-
});
|
|
2085
|
-
const handleDoubleClick = (file) => {
|
|
2086
|
-
if (file.mimeType === "application/vnd.google-apps.folder") {
|
|
2087
|
-
selectFolder(file);
|
|
2088
|
-
} else {
|
|
2089
|
-
console.log("File selected:", file.id);
|
|
2090
|
-
selectedFile.value = file;
|
|
2091
|
-
googleSheetSettings.value.sheet_id = file.id;
|
|
2092
|
-
googleSheetSettings.value.sheet_name = file.name;
|
|
2093
|
-
fetchSheetDetails(file.id);
|
|
2094
|
-
closeDrawer();
|
|
2095
|
-
}
|
|
2096
|
-
};
|
|
2097
|
-
const createDriveFileFromSheetSettings = () => {
|
|
2098
|
-
return {
|
|
2099
|
-
id: googleSheetSettings.value.sheet_id,
|
|
2100
|
-
name: googleSheetSettings.value.sheet_name,
|
|
2101
|
-
mimeType: "application/vnd.google-apps.spreadsheet"
|
|
2102
|
-
};
|
|
2103
|
-
};
|
|
2104
|
-
const selectFolder = async (folder) => {
|
|
2105
|
-
console.log("Folder selected:", folder.id);
|
|
2106
|
-
selectedFolders.value.push(folder);
|
|
2107
|
-
selectedFolderId.value = folder.id;
|
|
2108
|
-
fetchInitialFiles();
|
|
2109
|
-
};
|
|
2110
|
-
const fetchInitialFiles = async () => {
|
|
2111
|
-
pageResults.value = {};
|
|
2112
|
-
nextPageToken.value = null;
|
|
2113
|
-
currentPage.value = 1;
|
|
2114
|
-
await fetchDriveFiles();
|
|
2115
|
-
};
|
|
2116
|
-
const pageFetched = () => {
|
|
2117
|
-
return Object.prototype.hasOwnProperty.call(pageResults.value, currentPage.value);
|
|
2118
|
-
};
|
|
2119
|
-
const nextPageAvailable = computed(() => {
|
|
2120
|
-
const all_pages = Object.keys(pageResults.value).map((key) => Number(key));
|
|
2121
|
-
return nextPageToken.value !== null || Math.max(...all_pages) > currentPage.value;
|
|
2122
|
-
});
|
|
2123
|
-
const changePage = async (pageChange) => {
|
|
2124
|
-
currentPage.value = currentPage.value + pageChange;
|
|
2125
|
-
if (pageFetched()) {
|
|
2126
|
-
files.value = pageResults.value[currentPage.value];
|
|
2127
|
-
} else {
|
|
2128
|
-
await fetchDriveFiles(nextPageToken.value);
|
|
2129
|
-
}
|
|
2130
|
-
};
|
|
2131
|
-
const goToRoot = (event) => {
|
|
2132
|
-
event.preventDefault();
|
|
2133
|
-
selectedFolders.value = [];
|
|
2134
|
-
selectedFolderId.value = "";
|
|
2135
|
-
fetchInitialFiles();
|
|
2136
|
-
};
|
|
2137
|
-
const goToFolder = (index) => {
|
|
2138
|
-
selectedFolders.value = selectedFolders.value.slice(0, index + 1);
|
|
2139
|
-
selectedFolderId.value = selectedFolders.value[index].id;
|
|
2140
|
-
fetchInitialFiles();
|
|
2141
|
-
};
|
|
2142
|
-
const signOut = async () => {
|
|
2143
|
-
try {
|
|
2144
|
-
const authInstance = gapi.auth2.getAuthInstance();
|
|
2145
|
-
await authInstance.signOut();
|
|
2146
|
-
authInstance.disconnect();
|
|
2147
|
-
isAuthenticated.value = false;
|
|
2148
|
-
dataLoaded.value = false;
|
|
2149
|
-
id_token.value = "";
|
|
2150
|
-
accessToken.value = "";
|
|
2151
|
-
data.value = null;
|
|
2152
|
-
files.value = [];
|
|
2153
|
-
} catch (error) {
|
|
2154
|
-
console.error("Error during sign out:", error);
|
|
2155
|
-
}
|
|
2156
|
-
};
|
|
2157
|
-
const initGoogleAuth = async () => {
|
|
2158
|
-
try {
|
|
2159
|
-
await new Promise((resolve) => gapi.load("auth2", resolve));
|
|
2160
|
-
await gapi.auth2.init({
|
|
2161
|
-
client_id: "752151734213-6oetksv4gjcenkrdsr9jjk7omm5qbt7n.apps.googleusercontent.com",
|
|
2162
|
-
scope: "https://www.googleapis.com/auth/drive.readonly https://www.googleapis.com/auth/spreadsheets"
|
|
2163
|
-
});
|
|
2164
|
-
const authInstance = gapi.auth2.getAuthInstance();
|
|
2165
|
-
isAuthenticated.value = authInstance.isSignedIn.get();
|
|
2166
|
-
if (isAuthenticated.value) {
|
|
2167
|
-
const googleUser = authInstance.currentUser.get();
|
|
2168
|
-
const authResponse = googleUser.getAuthResponse();
|
|
2169
|
-
id_token.value = authResponse.id_token;
|
|
2170
|
-
accessToken.value = authResponse.access_token;
|
|
2171
|
-
setBackendToken();
|
|
2172
|
-
dataLoaded.value = true;
|
|
2173
|
-
}
|
|
2174
|
-
authInstance.isSignedIn.listen(async (isSignedIn) => {
|
|
2175
|
-
isAuthenticated.value = isSignedIn;
|
|
2176
|
-
if (isSignedIn) {
|
|
2177
|
-
const googleUser = authInstance.currentUser.get();
|
|
2178
|
-
const authResponse = googleUser.getAuthResponse();
|
|
2179
|
-
id_token.value = authResponse.id_token;
|
|
2180
|
-
accessToken.value = authResponse.access_token;
|
|
2181
|
-
setBackendToken();
|
|
2182
|
-
dataLoaded.value = true;
|
|
2183
|
-
} else {
|
|
2184
|
-
dataLoaded.value = false;
|
|
2185
|
-
id_token.value = "";
|
|
2186
|
-
accessToken.value = "";
|
|
2187
|
-
data.value = null;
|
|
2188
|
-
files.value = [];
|
|
2189
|
-
}
|
|
2190
|
-
});
|
|
2191
|
-
} catch (error) {
|
|
2192
|
-
console.error("Error initializing Google Auth:", error);
|
|
2193
|
-
}
|
|
2194
|
-
};
|
|
2195
|
-
onMounted(async () => {
|
|
2196
|
-
await initGoogleAuth();
|
|
2197
|
-
if (googleSheetSettings.value.sheet_id) {
|
|
2198
|
-
selectedFile.value = createDriveFileFromSheetSettings();
|
|
2199
|
-
fetchSheetDetails(googleSheetSettings.value.sheet_id);
|
|
2200
|
-
if (googleSheetSettings.value.access_token == "") {
|
|
2201
|
-
setBackendToken();
|
|
2202
|
-
}
|
|
2203
|
-
}
|
|
2204
|
-
});
|
|
2205
|
-
const doTokenRefresh = async () => {
|
|
2206
|
-
const authInstance = gapi.auth2.getAuthInstance();
|
|
2207
|
-
isAuthenticated.value = authInstance.isSignedIn.get();
|
|
2208
|
-
if (isAuthenticated.value) {
|
|
2209
|
-
const googleUser = authInstance.currentUser.get();
|
|
2210
|
-
const authResponse = googleUser.getAuthResponse();
|
|
2211
|
-
id_token.value = authResponse.id_token;
|
|
2212
|
-
accessToken.value = authResponse.access_token;
|
|
2213
|
-
tokenAvailableInBackend.value = false;
|
|
2214
|
-
setBackendToken();
|
|
2215
|
-
} else {
|
|
2216
|
-
signIn();
|
|
2217
|
-
}
|
|
2218
|
-
};
|
|
2219
|
-
return (_ctx, _cache) => {
|
|
2220
|
-
const _component_el_option = resolveComponent("el-option");
|
|
2221
|
-
const _component_el_select = resolveComponent("el-select");
|
|
2222
|
-
const _component_el_popover = resolveComponent("el-popover");
|
|
2223
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
2224
|
-
createBaseVNode("div", _hoisted_1$1, [
|
|
2225
|
-
_cache[7] || (_cache[7] = createBaseVNode("img", {
|
|
2226
|
-
src: _imports_0,
|
|
2227
|
-
alt: "Google Sheets icon",
|
|
2228
|
-
class: "file-icon"
|
|
2229
|
-
}, null, -1)),
|
|
2230
|
-
_cache[8] || (_cache[8] = createBaseVNode("span", null, "Google Sheets", -1)),
|
|
2231
|
-
_cache[9] || (_cache[9] = createBaseVNode("hr", null, null, -1)),
|
|
2232
|
-
!isAuthenticated.value ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
2233
|
-
createBaseVNode("div", { class: "buttons-container" }, [
|
|
2234
|
-
createBaseVNode("button", {
|
|
2235
|
-
for: "file-upload",
|
|
2236
|
-
class: "file-upload-label",
|
|
2237
|
-
onClick: signIn
|
|
2238
|
-
}, _cache[3] || (_cache[3] = [
|
|
2239
|
-
createTextVNode(" Sign in "),
|
|
2240
|
-
createBaseVNode("span", { class: "material-icons file-icon" }, "login", -1)
|
|
2241
|
-
]))
|
|
2242
|
-
])
|
|
2243
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
2244
|
-
createBaseVNode("div", { class: "buttons-container" }, [
|
|
2245
|
-
createBaseVNode("button", { onClick: signOut }, _cache[4] || (_cache[4] = [
|
|
2246
|
-
createBaseVNode("span", { class: "material-icons" }, "exit_to_app", -1),
|
|
2247
|
-
createTextVNode(" Sign Out ")
|
|
2248
|
-
])),
|
|
2249
|
-
createBaseVNode("button", { onClick: doTokenRefresh }, _cache[5] || (_cache[5] = [
|
|
2250
|
-
createBaseVNode("span", { class: "material-icons" }, "refresh", -1),
|
|
2251
|
-
createTextVNode(" refresh login ")
|
|
2252
|
-
]))
|
|
2253
|
-
])
|
|
2254
|
-
])),
|
|
2255
|
-
createBaseVNode("div", { class: "buttons-container" }, [
|
|
2256
|
-
createBaseVNode("button", { onClick: openDrawer }, _cache[6] || (_cache[6] = [
|
|
2257
|
-
createBaseVNode("span", { class: "material-icons" }, "folder_open", -1),
|
|
2258
|
-
createTextVNode(" Select file ")
|
|
2259
|
-
]))
|
|
2260
|
-
])
|
|
2261
|
-
]),
|
|
2262
|
-
selectedFile.value ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
2263
|
-
_cache[12] || (_cache[12] = createBaseVNode("div", { class: "listbox-title" }, "Selected File", -1)),
|
|
2264
|
-
createBaseVNode("div", _hoisted_5$1, [
|
|
2265
|
-
selectedFile.value.mimeType === "application/vnd.google-apps.spreadsheet" ? (openBlock(), createElementBlock("img", _hoisted_6)) : createCommentVNode("", true),
|
|
2266
|
-
createTextVNode(" " + toDisplayString(selectedFile.value.name), 1)
|
|
2267
|
-
]),
|
|
2268
|
-
createBaseVNode("div", _hoisted_7, [
|
|
2269
|
-
_cache[11] || (_cache[11] = createTextVNode(" select a sheet ")),
|
|
2270
|
-
createVNode(_component_el_select, {
|
|
2271
|
-
modelValue: googleSheetSettings.value.worksheet_name,
|
|
2272
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => googleSheetSettings.value.worksheet_name = $event),
|
|
2273
|
-
placeholder: "Select a sheet",
|
|
2274
|
-
size: "small"
|
|
2275
|
-
}, {
|
|
2276
|
-
default: withCtx(() => {
|
|
2277
|
-
var _a;
|
|
2278
|
-
return [
|
|
2279
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList((_a = selectedGoogleSheet.value) == null ? void 0 : _a.sheets, (sheet) => {
|
|
2280
|
-
return openBlock(), createBlock(_component_el_option, {
|
|
2281
|
-
key: sheet.name,
|
|
2282
|
-
label: sheet.name,
|
|
2283
|
-
value: sheet.name
|
|
2284
|
-
}, null, 8, ["label", "value"]);
|
|
2285
|
-
}), 128))
|
|
2286
|
-
];
|
|
2287
|
-
}),
|
|
2288
|
-
_: 1
|
|
2289
|
-
}, 8, ["modelValue"]),
|
|
2290
|
-
createVNode(_component_el_popover, {
|
|
2291
|
-
placement: "top-start",
|
|
2292
|
-
width: "200",
|
|
2293
|
-
trigger: "hover"
|
|
2294
|
-
}, {
|
|
2295
|
-
reference: withCtx(() => _cache[10] || (_cache[10] = [
|
|
2296
|
-
createBaseVNode("span", { class: "material-icons info-icon" }, "info", -1)
|
|
2297
|
-
])),
|
|
2298
|
-
default: withCtx(() => {
|
|
2299
|
-
var _a, _b;
|
|
2300
|
-
return [
|
|
2301
|
-
createBaseVNode("p", null, "Number of Rows: " + toDisplayString((_a = selectedSheet.value) == null ? void 0 : _a.rows), 1),
|
|
2302
|
-
createBaseVNode("p", null, "Number of Columns: " + toDisplayString((_b = selectedSheet.value) == null ? void 0 : _b.columns), 1)
|
|
2303
|
-
];
|
|
2304
|
-
}),
|
|
2305
|
-
_: 1
|
|
2306
|
-
})
|
|
2307
|
-
])
|
|
2308
|
-
])) : createCommentVNode("", true),
|
|
2309
|
-
showFiles.value ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
2310
|
-
createBaseVNode("div", _hoisted_9, [
|
|
2311
|
-
createBaseVNode("span", {
|
|
2312
|
-
class: "close",
|
|
2313
|
-
onClick: closeDrawer
|
|
2314
|
-
}, "×"),
|
|
2315
|
-
_cache[14] || (_cache[14] = createBaseVNode("div", { class: "listbox-title" }, "Google Drive Files", -1)),
|
|
2316
|
-
createBaseVNode("div", _hoisted_10, [
|
|
2317
|
-
selectedFolders.value.length === 0 ? (openBlock(), createElementBlock("span", _hoisted_11, ".")) : (openBlock(), createElementBlock("span", _hoisted_12, [
|
|
2318
|
-
createBaseVNode("a", {
|
|
2319
|
-
href: "#",
|
|
2320
|
-
onClick: goToRoot
|
|
2321
|
-
}, "."),
|
|
2322
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(selectedFolders.value, (folder, index) => {
|
|
2323
|
-
return openBlock(), createElementBlock("span", {
|
|
2324
|
-
key: folder.id
|
|
2325
|
-
}, [
|
|
2326
|
-
_cache[13] || (_cache[13] = createTextVNode(" / ")),
|
|
2327
|
-
createBaseVNode("a", {
|
|
2328
|
-
href: "#",
|
|
2329
|
-
onClick: ($event) => goToFolder(index)
|
|
2330
|
-
}, toDisplayString(folder.name), 9, _hoisted_13)
|
|
2331
|
-
]);
|
|
2332
|
-
}), 128))
|
|
2333
|
-
]))
|
|
2334
|
-
]),
|
|
2335
|
-
createBaseVNode("div", _hoisted_14, [
|
|
2336
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(displayedFiles.value, (file) => {
|
|
2337
|
-
return openBlock(), createElementBlock("div", {
|
|
2338
|
-
key: file.id,
|
|
2339
|
-
class: normalizeClass({ selected: selectedFolderId.value === file.id }),
|
|
2340
|
-
onDblclick: ($event) => handleDoubleClick(file),
|
|
2341
|
-
onClick: ($event) => selectedFolderId.value = file.id
|
|
2342
|
-
}, [
|
|
2343
|
-
file.mimeType === "application/vnd.google-apps.spreadsheet" ? (openBlock(), createElementBlock("img", _hoisted_16)) : (openBlock(), createElementBlock("span", _hoisted_17, toDisplayString(file.mimeType === "application/vnd.google-apps.folder" ? "folder" : "insert_drive_file"), 1)),
|
|
2344
|
-
createTextVNode(" " + toDisplayString(file.name), 1)
|
|
2345
|
-
], 42, _hoisted_15);
|
|
2346
|
-
}), 128))
|
|
2347
|
-
]),
|
|
2348
|
-
createBaseVNode("div", _hoisted_18, [
|
|
2349
|
-
currentPage.value > 1 ? (openBlock(), createElementBlock("button", {
|
|
2350
|
-
key: 0,
|
|
2351
|
-
onClick: _cache[1] || (_cache[1] = ($event) => changePage(-1))
|
|
2352
|
-
}, "Previous page")) : createCommentVNode("", true),
|
|
2353
|
-
nextPageAvailable.value ? (openBlock(), createElementBlock("button", {
|
|
2354
|
-
key: 1,
|
|
2355
|
-
onClick: _cache[2] || (_cache[2] = ($event) => changePage(1))
|
|
2356
|
-
}, "Next page")) : createCommentVNode("", true)
|
|
2357
|
-
])
|
|
2358
|
-
])
|
|
2359
|
-
])) : createCommentVNode("", true)
|
|
2360
|
-
], 64);
|
|
2361
|
-
};
|
|
2362
|
-
}
|
|
2363
|
-
});
|
|
2364
|
-
const googleSheet_vue_vue_type_style_index_0_scoped_f96970aa_lang = "";
|
|
2365
|
-
const GoogleSheets = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-f96970aa"]]);
|
|
2366
|
-
function get_template_source_type(type, options) {
|
|
2367
|
-
switch (type) {
|
|
2368
|
-
case "SAMPLE_USERS":
|
|
2369
|
-
return {
|
|
2370
|
-
SAMPLE_USERS: true,
|
|
2371
|
-
size: (options == null ? void 0 : options.size) || 100,
|
|
2372
|
-
// Default size is 100 if not provided
|
|
2373
|
-
orientation: (options == null ? void 0 : options.orientation) || "row",
|
|
2374
|
-
// Default orientation is 'ROWS'
|
|
2375
|
-
fields: []
|
|
2376
|
-
};
|
|
2377
|
-
case "GOOGLE_SHEET":
|
|
2378
|
-
return {
|
|
2379
|
-
GOOGLE_SHEET: true,
|
|
2380
|
-
class_name: "GoogleSheet",
|
|
2381
|
-
access_token: (options == null ? void 0 : options.access_token) || "",
|
|
2382
|
-
// Expecting options to have access_token, else default is empty
|
|
2383
|
-
sheet_id: (options == null ? void 0 : options.sheet_id) || "",
|
|
2384
|
-
// Expecting options to have sheet_id, else default is empty
|
|
2385
|
-
worksheet_name: (options == null ? void 0 : options.worksheet_name) || "",
|
|
2386
|
-
// Default worksheet name is empty if not provided
|
|
2387
|
-
orientation: (options == null ? void 0 : options.orientation) || "row",
|
|
2388
|
-
sheet_name: (options == null ? void 0 : options.sheet_name) || "",
|
|
2389
|
-
fields: []
|
|
2390
|
-
};
|
|
2391
|
-
default:
|
|
2392
|
-
throw new Error("Unsupported configuration type");
|
|
2393
|
-
}
|
|
2394
|
-
}
|
|
2395
|
-
const _hoisted_1 = {
|
|
2396
|
-
key: 0,
|
|
2397
|
-
class: "listbox-wrapper"
|
|
2398
|
-
};
|
|
2399
|
-
const _hoisted_2 = { class: "listbox-wrapper" };
|
|
2400
|
-
const _hoisted_3 = {
|
|
2401
|
-
key: 0,
|
|
2402
|
-
class: "file-upload-container"
|
|
2403
|
-
};
|
|
2404
|
-
const _hoisted_4 = {
|
|
2405
|
-
key: 0,
|
|
2406
|
-
class: "file-upload-wrapper"
|
|
2407
|
-
};
|
|
2408
|
-
const _hoisted_5 = {
|
|
2409
|
-
key: 1,
|
|
2410
|
-
class: "file-upload-wrapper"
|
|
2411
|
-
};
|
|
2412
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
2413
|
-
__name: "ExternalSource",
|
|
2414
|
-
setup(__props, { expose: __expose }) {
|
|
2415
|
-
const nodeStore = useNodeStore();
|
|
2416
|
-
const sampleUsers = ref(null);
|
|
2417
|
-
const googleSheet = ref(null);
|
|
2418
|
-
const nodeExternalSource = ref(null);
|
|
2419
|
-
const dataLoaded = ref(false);
|
|
2420
|
-
const typeSelected = ref(false);
|
|
2421
|
-
const writingOptions = ["sample_users", "google_sheet"];
|
|
2422
|
-
const selectedExternalSource = ref(null);
|
|
2423
|
-
const isDirty = ref(false);
|
|
2424
|
-
let activeWatchStopHandle = null;
|
|
2425
|
-
watchEffect(() => {
|
|
2426
|
-
if (activeWatchStopHandle) {
|
|
2427
|
-
activeWatchStopHandle();
|
|
2428
|
-
activeWatchStopHandle = null;
|
|
2429
|
-
}
|
|
2430
|
-
if (dataLoaded.value) {
|
|
2431
|
-
activeWatchStopHandle = watch(
|
|
2432
|
-
googleSheet,
|
|
2433
|
-
() => {
|
|
2434
|
-
isDirty.value = true;
|
|
2435
|
-
},
|
|
2436
|
-
{ deep: true }
|
|
2437
|
-
);
|
|
2438
|
-
}
|
|
2439
|
-
});
|
|
2440
|
-
const loadNodeData = async (nodeId) => {
|
|
2441
|
-
var _a, _b, _c, _d, _e;
|
|
2442
|
-
const nodeResult = await nodeStore.getNodeData(nodeId, false);
|
|
2443
|
-
nodeExternalSource.value = nodeResult == null ? void 0 : nodeResult.setting_input;
|
|
2444
|
-
if ((_a = nodeExternalSource.value) == null ? void 0 : _a.is_setup) {
|
|
2445
|
-
if (((_b = nodeExternalSource.value) == null ? void 0 : _b.identifier) == "sample_users") {
|
|
2446
|
-
sampleUsers.value = (_c = nodeExternalSource.value) == null ? void 0 : _c.source_settings;
|
|
2447
|
-
selectedExternalSource.value = "sample_users";
|
|
2448
|
-
} else if (((_d = nodeExternalSource.value) == null ? void 0 : _d.identifier) == "google_sheet") {
|
|
2449
|
-
googleSheet.value = (_e = nodeExternalSource.value) == null ? void 0 : _e.source_settings;
|
|
2450
|
-
selectedExternalSource.value = "google_sheet";
|
|
2451
|
-
}
|
|
2452
|
-
}
|
|
2453
|
-
typeSelected.value = true;
|
|
2454
|
-
dataLoaded.value = true;
|
|
2455
|
-
isDirty.value = false;
|
|
2456
|
-
};
|
|
2457
|
-
const loadTemplateValue = () => {
|
|
2458
|
-
if (selectedExternalSource.value === "sample_users") {
|
|
2459
|
-
sampleUsers.value = get_template_source_type("SAMPLE_USERS");
|
|
2460
|
-
if (nodeExternalSource.value) {
|
|
2461
|
-
nodeExternalSource.value.source_settings = sampleUsers.value;
|
|
2462
|
-
}
|
|
2463
|
-
isDirty.value = true;
|
|
2464
|
-
} else if (selectedExternalSource.value === "google_sheet") {
|
|
2465
|
-
if (!googleSheet.value) {
|
|
2466
|
-
googleSheet.value = get_template_source_type("GOOGLE_SHEET");
|
|
2467
|
-
}
|
|
2468
|
-
if (nodeExternalSource.value) {
|
|
2469
|
-
nodeExternalSource.value.source_settings = googleSheet.value;
|
|
2470
|
-
}
|
|
2471
|
-
isDirty.value = false;
|
|
2472
|
-
}
|
|
2473
|
-
typeSelected.value = true;
|
|
2474
|
-
if (nodeExternalSource.value && selectedExternalSource.value) {
|
|
2475
|
-
nodeExternalSource.value.identifier = selectedExternalSource.value;
|
|
2476
|
-
}
|
|
2477
|
-
};
|
|
2478
|
-
const pushNodeDataAction = async () => {
|
|
2479
|
-
if (nodeExternalSource.value && isDirty.value) {
|
|
2480
|
-
nodeExternalSource.value.is_setup = true;
|
|
2481
|
-
nodeExternalSource.value.source_settings.fields = [];
|
|
2482
|
-
isDirty.value = false;
|
|
2483
|
-
}
|
|
2484
|
-
await nodeStore.updateSettings(nodeExternalSource);
|
|
2485
|
-
if (nodeExternalSource.value) {
|
|
2486
|
-
await nodeStore.getNodeData(Number(nodeExternalSource.value.node_id), false);
|
|
2487
|
-
}
|
|
2488
|
-
};
|
|
2489
|
-
const pushNodeData = async () => {
|
|
2490
|
-
dataLoaded.value = false;
|
|
2491
|
-
if (nodeExternalSource.value) {
|
|
2492
|
-
if (isDirty.value || nodeExternalSource.value.identifier) {
|
|
2493
|
-
await pushNodeDataAction();
|
|
2494
|
-
}
|
|
2495
|
-
}
|
|
2496
|
-
};
|
|
2497
|
-
__expose({
|
|
2498
|
-
loadNodeData,
|
|
2499
|
-
pushNodeData
|
|
2500
|
-
});
|
|
2501
|
-
return (_ctx, _cache) => {
|
|
2502
|
-
const _component_el_option = resolveComponent("el-option");
|
|
2503
|
-
const _component_el_select = resolveComponent("el-select");
|
|
2504
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
2505
|
-
dataLoaded.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
2506
|
-
_cache[2] || (_cache[2] = createBaseVNode("div", { class: "listbox-subtitle" }, "Select the type of external source", -1)),
|
|
2507
|
-
createVNode(_component_el_select, {
|
|
2508
|
-
modelValue: selectedExternalSource.value,
|
|
2509
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedExternalSource.value = $event),
|
|
2510
|
-
class: "m-2",
|
|
2511
|
-
placeholder: "Select type of external source",
|
|
2512
|
-
size: "small",
|
|
2513
|
-
onChange: loadTemplateValue
|
|
2514
|
-
}, {
|
|
2515
|
-
default: withCtx(() => [
|
|
2516
|
-
(openBlock(), createElementBlock(Fragment, null, renderList(writingOptions, (item) => {
|
|
2517
|
-
return createVNode(_component_el_option, {
|
|
2518
|
-
key: item,
|
|
2519
|
-
label: item,
|
|
2520
|
-
value: item
|
|
2521
|
-
}, null, 8, ["label", "value"]);
|
|
2522
|
-
}), 64))
|
|
2523
|
-
]),
|
|
2524
|
-
_: 1
|
|
2525
|
-
}, 8, ["modelValue"])
|
|
2526
|
-
])) : createCommentVNode("", true),
|
|
2527
|
-
createBaseVNode("div", _hoisted_2, [
|
|
2528
|
-
typeSelected.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
2529
|
-
selectedExternalSource.value === "sample_users" && sampleUsers.value ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("", true),
|
|
2530
|
-
selectedExternalSource.value === "google_sheet" && googleSheet.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
2531
|
-
createVNode(GoogleSheets, {
|
|
2532
|
-
modelValue: googleSheet.value,
|
|
2533
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => googleSheet.value = $event)
|
|
2534
|
-
}, null, 8, ["modelValue"])
|
|
2535
|
-
])) : createCommentVNode("", true)
|
|
2536
|
-
])) : (openBlock(), createBlock(unref(CodeLoader), { key: 1 }))
|
|
2537
|
-
])
|
|
2538
|
-
], 64);
|
|
2539
|
-
};
|
|
2540
|
-
}
|
|
2541
|
-
});
|
|
2542
|
-
const ExternalSource_vue_vue_type_style_index_0_scoped_dc36d3d0_lang = "";
|
|
2543
|
-
const externalSource = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-dc36d3d0"]]);
|
|
2544
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
2545
|
-
__name: "GoogleSheet",
|
|
2546
|
-
props: {
|
|
2547
|
-
nodeId: {
|
|
2548
|
-
type: Number,
|
|
2549
|
-
required: true
|
|
2550
|
-
}
|
|
2551
|
-
},
|
|
2552
|
-
setup(__props) {
|
|
2553
|
-
const nodeStore = useNodeStore();
|
|
2554
|
-
const childComp = ref(null);
|
|
2555
|
-
const props = __props;
|
|
2556
|
-
const el = ref(null);
|
|
2557
|
-
const drawer = ref(false);
|
|
2558
|
-
const closeOnDrawer = () => {
|
|
2559
|
-
var _a;
|
|
2560
|
-
(_a = childComp.value) == null ? void 0 : _a.pushNodeData();
|
|
2561
|
-
drawer.value = false;
|
|
2562
|
-
nodeStore.isDrawerOpen = false;
|
|
2563
|
-
};
|
|
2564
|
-
const openDrawer = async () => {
|
|
2565
|
-
if (nodeStore.node_id === props.nodeId) {
|
|
2566
|
-
return;
|
|
2567
|
-
}
|
|
2568
|
-
nodeStore.closeDrawer();
|
|
2569
|
-
drawer.value = true;
|
|
2570
|
-
const drawerOpen = nodeStore.isDrawerOpen;
|
|
2571
|
-
nodeStore.isDrawerOpen = true;
|
|
2572
|
-
await nextTick();
|
|
2573
|
-
if (nodeStore.node_id === props.nodeId && drawerOpen) {
|
|
2574
|
-
return;
|
|
2575
|
-
}
|
|
2576
|
-
if (childComp.value) {
|
|
2577
|
-
childComp.value.loadNodeData(props.nodeId);
|
|
2578
|
-
nodeStore.openDrawer(closeOnDrawer);
|
|
2579
|
-
}
|
|
2580
|
-
};
|
|
2581
|
-
onMounted(async () => {
|
|
2582
|
-
await nextTick();
|
|
2583
|
-
});
|
|
2584
|
-
return (_ctx, _cache) => {
|
|
2585
|
-
return openBlock(), createElementBlock("div", {
|
|
2586
|
-
ref_key: "el",
|
|
2587
|
-
ref: el
|
|
2588
|
-
}, [
|
|
2589
|
-
createVNode(NodeButton, {
|
|
2590
|
-
ref: "nodeButton",
|
|
2591
|
-
"node-id": __props.nodeId,
|
|
2592
|
-
"image-src": "google_sheet.png",
|
|
2593
|
-
title: `${__props.nodeId}: Google sheet input`,
|
|
2594
|
-
onClick: openDrawer
|
|
2595
|
-
}, null, 8, ["node-id", "title"]),
|
|
2596
|
-
drawer.value ? (openBlock(), createBlock(Teleport, {
|
|
2597
|
-
key: 0,
|
|
2598
|
-
to: "#nodesettings"
|
|
2599
|
-
}, [
|
|
2600
|
-
createVNode(NodeTitle, {
|
|
2601
|
-
title: "External source",
|
|
2602
|
-
intro: "Import data from an external source"
|
|
2603
|
-
}),
|
|
2604
|
-
createVNode(externalSource, {
|
|
2605
|
-
ref_key: "childComp",
|
|
2606
|
-
ref: childComp,
|
|
2607
|
-
"node-id": __props.nodeId
|
|
2608
|
-
}, null, 8, ["node-id"])
|
|
2609
|
-
])) : createCommentVNode("", true)
|
|
2610
|
-
], 512);
|
|
2611
|
-
};
|
|
2612
|
-
}
|
|
2613
|
-
});
|
|
2614
|
-
export {
|
|
2615
|
-
_sfc_main as default
|
|
2616
|
-
};
|