@ms-atlas/datastudio 0.1.19

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.

Potentially problematic release.


This version of @ms-atlas/datastudio might be problematic. Click here for more details.

Files changed (38) hide show
  1. package/ExternalLibraries/Monaco/vs/loader.js +2166 -0
  2. package/ExternalLibraries/URI.min.js +1901 -0
  3. package/ExternalLibraries/crossroads.min.js +453 -0
  4. package/ExternalLibraries/css.js +165 -0
  5. package/ExternalLibraries/d3.min.js +10857 -0
  6. package/ExternalLibraries/es6-promise.min.js +363 -0
  7. package/ExternalLibraries/hammer.js +2224 -0
  8. package/ExternalLibraries/hull.js +444 -0
  9. package/ExternalLibraries/i18n.min.js +115 -0
  10. package/ExternalLibraries/jquery-ui-timepicker-addon.min.css +76 -0
  11. package/ExternalLibraries/jquery-ui-timepicker-addon.min.js +1918 -0
  12. package/ExternalLibraries/jquery-ui.js +17201 -0
  13. package/ExternalLibraries/jquery-ui.min.css +1454 -0
  14. package/ExternalLibraries/jquery.history.js +2173 -0
  15. package/ExternalLibraries/jquery.min.js +5168 -0
  16. package/ExternalLibraries/jquery.mockjax.min.js +445 -0
  17. package/ExternalLibraries/jquery.modal.js +173 -0
  18. package/ExternalLibraries/jstree.js +10086 -0
  19. package/ExternalLibraries/jstree.style.css +1048 -0
  20. package/ExternalLibraries/jwt-decode.min.js +142 -0
  21. package/ExternalLibraries/knockout-latest.debug.js +7375 -0
  22. package/ExternalLibraries/knockout.mapping.min.js +534 -0
  23. package/ExternalLibraries/moment.js +3389 -0
  24. package/ExternalLibraries/q.js +1974 -0
  25. package/ExternalLibraries/require.js +2230 -0
  26. package/ExternalLibraries/signals.min.js +179 -0
  27. package/ExternalLibraries/text.js +445 -0
  28. package/ExternalLibraries/uuid.js +274 -0
  29. package/datastudio.application.mainpage.js +1502 -0
  30. package/datastudio.application.shared.js +626 -0
  31. package/datastudio.bootstrapper.js +517 -0
  32. package/fonts.css +14 -0
  33. package/nls/resx.js +1 -0
  34. package/nls/root/resx.js +22 -0
  35. package/package.json +22 -0
  36. package/scripts/application/sourceMapper.js +15 -0
  37. package/scripts/libs/adal/adal.js +720 -0
  38. package/stylesheets/main.css +8879 -0
@@ -0,0 +1,1502 @@
1
+ var Microsoft;
2
+ !(function (t) {
3
+ var e;
4
+ !(function (t) {
5
+ var e;
6
+ !(function (t) {
7
+ var e = (function () {
8
+ function t() {}
9
+ return (
10
+ (t.getInstanceOf = function (e) {
11
+ e in t.activeInstances ||
12
+ ((t.activeInstances[e] = t.generateInstanceFromName(e)),
13
+ (t.activeInstanceReferences[e] = []));
14
+ var n = Date.now().toString();
15
+ return (
16
+ t.activeInstanceReferences[e].push(n),
17
+ {
18
+ instance: t.activeInstances[e],
19
+ release: function () {
20
+ var o = { className: e, instanceReferenceID: n };
21
+ t.disposeOfInstanceReference(o);
22
+ },
23
+ }
24
+ );
25
+ }),
26
+ (t.disposeOfInstanceReference = function (e) {
27
+ var n = e.className;
28
+ (t.activeInstanceReferences[n] = (
29
+ t.activeInstanceReferences[n] || []
30
+ ).filter(function (t) {
31
+ return t != e.instanceReferenceID;
32
+ })),
33
+ t.activeInstanceReferences[n].length < 1 &&
34
+ (t.activeInstances[n].dispose(),
35
+ delete t.activeInstances[n],
36
+ delete t.activeInstanceReferences[n]);
37
+ }),
38
+ (t.generateInstanceFromName = function (t) {
39
+ for (var e = window, n = t.split("."), o = 0; o < n.length; o++) {
40
+ if (!(n[o] in e))
41
+ throw n[o] + " does not exist in " + n.splice(0, o).join(".");
42
+ e = e[n[o]];
43
+ }
44
+ if ("function" == typeof e) return new e();
45
+ throw t + " is not a valid class name";
46
+ }),
47
+ (t.activeInstances = {}),
48
+ (t.activeInstanceReferences = {}),
49
+ t
50
+ );
51
+ })();
52
+ (t.ManagerFactoryImpl = e), (t.ManagerFactory = e);
53
+ })((e = t.Application || (t.Application = {})));
54
+ })((e = t.DataStudio || (t.DataStudio = {})));
55
+ })(Microsoft || (Microsoft = {}));
56
+ var Microsoft;
57
+ !(function (t) {
58
+ var e;
59
+ !(function (t) {
60
+ var e;
61
+ !(function (t) {
62
+ var e;
63
+ !(function (t) {
64
+ var e;
65
+ !(function (t) {
66
+ var e = (function () {
67
+ function t() {}
68
+ return (
69
+ (t.CreateComponentNode = function (t) {
70
+ console.debug(
71
+ "Rendering " + ko.utils.unwrapObservable(t.componentName)
72
+ );
73
+ var e = document.createElement("div"),
74
+ n = { componentConfig: t };
75
+ return (
76
+ ko.applyBindingsToNode(e, {
77
+ component: { name: t.componentName, params: n },
78
+ }),
79
+ e
80
+ );
81
+ }),
82
+ t
83
+ );
84
+ })();
85
+ t.KnockoutHelper = e;
86
+ })((e = t.Utils || (t.Utils = {})));
87
+ })((e = t.Knockout || (t.Knockout = {})));
88
+ })((e = t.Application || (t.Application = {})));
89
+ })((e = t.DataStudio || (t.DataStudio = {})));
90
+ })(Microsoft || (Microsoft = {}));
91
+ var Microsoft;
92
+ !(function (t) {
93
+ var e;
94
+ !(function (t) {
95
+ var e;
96
+ !(function (t) {
97
+ var e;
98
+ !(function (t) {
99
+ var e;
100
+ !(function (e) {
101
+ var n = (function () {
102
+ function e() {}
103
+ return (
104
+ (e.prototype.init = function (t, n, o, i, r) {
105
+ var a = n(),
106
+ s = $(t),
107
+ c = s.find(a.contentContainerSelector),
108
+ u = [];
109
+ if (a.drawer) {
110
+ var l = s.find(a.drawer.tabsContainerSelector),
111
+ d = l.find(a.drawer.tabsSelector);
112
+ d.length > 0 &&
113
+ (d.attr("title", "New"),
114
+ d.click({ value: "New" }, function (t) {
115
+ e.showDrawer(d, s, a);
116
+ }),
117
+ ko.utils.domData.clear(d[0]),
118
+ ko.applyBindings(i, d[0]));
119
+ }
120
+ for (var f = 0; f < a.tabElementsGroups.length; f++) {
121
+ var p = a.tabElementsGroups[f],
122
+ g = s.find(p.tabsContainerSelector);
123
+ ko.utils.domData.clear(g[0]), ko.applyBindings(i, g[0]);
124
+ var v = p.tabElements;
125
+ e.updateTabGroup(g, c, s, v(), i, p, a),
126
+ u.push(v.subscribe(e.tabGroupCallback(g, c, s, i, p, a)));
127
+ }
128
+ var m = s.find(".tab");
129
+ if (m.length > 0 && m.filter(".active").length < 1) {
130
+ a.drawer && (m = m.not(a.drawer.tabsSelector));
131
+ var h = m.first();
132
+ h && h.addClass("active");
133
+ var b = c.find(".panelContent").first();
134
+ b && b.removeClass("hide");
135
+ }
136
+ return (
137
+ ko.utils.domNodeDisposal.addDisposeCallback(t, function () {
138
+ u.forEach(function (t) {
139
+ return t.dispose();
140
+ });
141
+ }),
142
+ { controlsDescendantBindings: !0 }
143
+ );
144
+ }),
145
+ (e.updateTabGroup = function (n, o, i, r, a, s, c) {
146
+ n.empty(), ko.cleanNode(o[0]);
147
+ var u = null;
148
+ if (r && r.length > 0) {
149
+ for (var l = 0; l < r.length; l++) {
150
+ var d = r[l],
151
+ f = ko.mapping.toJS(r[l]),
152
+ p = "tab" + s.id + "_" + l,
153
+ g = document.createElement("div"),
154
+ v = $(g);
155
+ if (
156
+ (v.addClass(s.tabsClass + " " + p + " " + f.icon),
157
+ v.attr("title", "" + f.text),
158
+ v.wrapInner(f.iconResource),
159
+ n.append(g),
160
+ f.componentName)
161
+ ) {
162
+ var m = $(document.createElement("div"));
163
+ m.addClass(c.contentContainerClass),
164
+ m.addClass(p),
165
+ m.addClass("hide");
166
+ var h = t.Utils.KnockoutHelper.CreateComponentNode(d);
167
+ m.append(h),
168
+ ko.applyBindings(a, m[0]),
169
+ o.find("." + p).remove(),
170
+ o.append(m);
171
+ }
172
+ var b = function (t, n, o, i, r, a) {
173
+ return function () {
174
+ a.tabIsExpanded && a.tabIsExpanded(!0),
175
+ e.showPanel("." + t, o, i, r),
176
+ e.hideDrawer(a),
177
+ n && n();
178
+ };
179
+ },
180
+ w = b(p, f.callback, n, o, i, c);
181
+ v.click(w), (!u || f.isDefault) && (u = w);
182
+ }
183
+ u();
184
+ }
185
+ var S = i.find(".tab");
186
+ S.length > 0
187
+ ? i.closest(".leftSidePanel:hidden").show()
188
+ : i.closest(".leftSidePanel").hide();
189
+ }),
190
+ (e.showPanel = function (t, e, n, o) {
191
+ var i = e.find(t);
192
+ i.hasClass("active") ||
193
+ (o.find(".tab").removeClass("active"),
194
+ i.addClass("active"),
195
+ n.children().addClass("hide"),
196
+ n.find(t).removeClass("hide"));
197
+ }),
198
+ (e.showDrawer = function (t, n, o) {
199
+ if (o.drawer) {
200
+ var i = $(o.drawer.contentContainerSelector);
201
+ t.hasClass("active")
202
+ ? (n.children().first().addClass("active"), e.hideDrawer(o))
203
+ : (n.children().removeClass("active"),
204
+ t.addClass("active"),
205
+ i.addClass("open"),
206
+ e.hideDrawerButtonClick(i, t, n, o));
207
+ }
208
+ }),
209
+ (e.hideDrawer = function (t) {
210
+ if (t.drawer) {
211
+ var e = $(t.drawer.contentContainerSelector),
212
+ n = $(t.drawer.tabsSelector);
213
+ n.removeClass("active"), e.removeClass("open");
214
+ }
215
+ }),
216
+ (e.hideDrawerButtonClick = function (t, n, o, i) {
217
+ t &&
218
+ t.length > 0 &&
219
+ t.find(".switch").click({ value: "Close" }, function (t) {
220
+ e.hideDrawer(i), o.children().first().addClass("active");
221
+ });
222
+ }),
223
+ (e.tabGroupCallback = function (t, n, o, i, r, a) {
224
+ return function (s) {
225
+ e.updateTabGroup(t, n, o, s, i, r, a);
226
+ };
227
+ }),
228
+ e
229
+ );
230
+ })();
231
+ e.TabControlBinding = n;
232
+ })((e = t.Bindings || (t.Bindings = {})));
233
+ })((e = t.Knockout || (t.Knockout = {})));
234
+ })((e = t.Application || (t.Application = {})));
235
+ })((e = t.DataStudio || (t.DataStudio = {})));
236
+ })(Microsoft || (Microsoft = {}));
237
+ var Microsoft;
238
+ !(function (t) {
239
+ var e;
240
+ !(function (t) {
241
+ var e;
242
+ !(function (t) {
243
+ var e;
244
+ !(function (t) {
245
+ var e = (function () {
246
+ function t() {}
247
+ return (
248
+ (t.prototype.update = function (t, e, n, o, i) {
249
+ var r = ko.unwrap(e());
250
+ for (var a in r) {
251
+ var s = r[a] || {};
252
+ $(t)[a](s);
253
+ }
254
+ }),
255
+ t
256
+ );
257
+ })(),
258
+ n = (function () {
259
+ function t() {}
260
+ return (
261
+ (t.prototype.init = function (t, e, n, o, i) {
262
+ var r = ko.unwrap(e());
263
+ r && r(t);
264
+ }),
265
+ t
266
+ );
267
+ })(),
268
+ o = (function () {
269
+ function t() {}
270
+ return (
271
+ (t.prototype.update = function (e, n, o, i, r) {
272
+ var a = n(),
273
+ s = a && a["switch"] ? a["switch"] : t._switchDefaultSelector,
274
+ c = $(e).find(s),
275
+ u = a && a.element ? $(a.element) : $(e),
276
+ l = a && a.expandOnClick ? !0 : !1,
277
+ d = a && a.collapsedSwitch ? a.collapsedSwitch : null,
278
+ f = a && a.expandedSwitch ? a.expandedSwitch : null,
279
+ p =
280
+ a && a.collapsableClass
281
+ ? a.collapsableClass
282
+ : t._collapsableClass,
283
+ g = u.hasClass(p),
284
+ v = a && a.isExpanded ? a.isExpanded : null;
285
+ ko.isObservable(v)
286
+ ? v()
287
+ ? t.showPanel(u, c, p, d, f)
288
+ : t.hidePanel(u, c, p, d, f)
289
+ : (g && d ? c.addClass(d) : !g && f && c.addClass(f),
290
+ c.click(function (e) {
291
+ e.stopPropagation(), t.triggerPanel(u, c, p, d, f);
292
+ }),
293
+ l &&
294
+ u.click(function () {
295
+ t.showPanel(u, c, p, d, f);
296
+ }));
297
+ }),
298
+ (t.triggerPanel = function (t, e, n, o, i) {
299
+ t.toggleClass(n), o && e.toggleClass(o), i && e.toggleClass(i);
300
+ }),
301
+ (t.showPanel = function (t, e, n, o, i) {
302
+ t.hasClass(n) &&
303
+ (t.removeClass(n), o && e.removeClass(o), i && e.addClass(i));
304
+ }),
305
+ (t.hidePanel = function (t, e, n, o, i) {
306
+ t.hasClass(n) ||
307
+ (t.addClass(n), i && e.removeClass(i), o && e.addClass(o));
308
+ }),
309
+ (t._switchDefaultSelector = ".switch"),
310
+ (t._collapsableClass = "collapsed"),
311
+ t
312
+ );
313
+ })(),
314
+ i = (function () {
315
+ function e() {}
316
+ return (
317
+ (e.prototype.init = function (e, n, o, i, r) {
318
+ var a = t.Utils.KnockoutHelper.CreateComponentNode(n());
319
+ $(e).append(a);
320
+ }),
321
+ e
322
+ );
323
+ })(),
324
+ r = (function () {
325
+ function t() {}
326
+ return (
327
+ (t.prototype.update = function (e, n, o, i, r) {
328
+ var a = ko.unwrap(n()),
329
+ s = a.data(),
330
+ c = a.config ? a.config() : null,
331
+ u = a.handlers,
332
+ l = a.contextMenuHandler;
333
+ l && (e.oncontextmenu = l),
334
+ a.handler && (u = { select_node: a.handler }),
335
+ t.buildTree(e, s, u, c);
336
+ }),
337
+ (t.buildTree = function (e, n, o, i) {
338
+ $(e).jstree("destroy");
339
+ var r = $.extend({}, { core: { data: n } }),
340
+ a = $.extend({}, t.defaultConfig, r, i),
341
+ s = $(e)
342
+ .jstree(a)
343
+ .on("ready.jstree", function () {
344
+ a.datastudio &&
345
+ a.datastudio.open_all &&
346
+ $(e).jstree("open_all");
347
+ });
348
+ for (var c in o) s.on(c + ".jstree", o[c]);
349
+ }),
350
+ (t.defaultConfig = {
351
+ core: { check_callback: !0, themes: { responsive: !0 } },
352
+ types: {
353
+ default: {
354
+ icon: "none",
355
+ valid_children: ["default", "level_1", "server"],
356
+ },
357
+ server: { icon: "none" },
358
+ },
359
+ plugins: ["state", "types", "wholerow"],
360
+ }),
361
+ t
362
+ );
363
+ })(),
364
+ a = (function () {
365
+ function t() {}
366
+ return (
367
+ (t.prototype.init = function (t, e, n, o, i) {
368
+ var r = e();
369
+ $(t).toggle(ko.utils.unwrapObservable(r));
370
+ }),
371
+ (t.prototype.update = function (t, e, n, o, i) {
372
+ var r = e();
373
+ ko.utils.unwrapObservable(r)
374
+ ? $(t).slideDown("slow")
375
+ : $(t).hide();
376
+ }),
377
+ t
378
+ );
379
+ })(),
380
+ s = (function () {
381
+ function t() {}
382
+ return (
383
+ (t.prototype.update = function (t, e, n, o, i) {
384
+ var r = ko.unwrap(e());
385
+ r.chartData(), $(t).get(0);
386
+ }),
387
+ t
388
+ );
389
+ })(),
390
+ c = (function () {
391
+ function t() {}
392
+ return (
393
+ (t.prototype.init = function (e, n, o, i, r) {
394
+ (this.arc = d3.svg
395
+ .arc()
396
+ .startAngle(0)
397
+ .innerRadius(t.radius)
398
+ .outerRadius(t.radius - t.border)),
399
+ (this.parent = d3.select($(e).get(0))),
400
+ (this.svg = this.parent
401
+ .append("svg")
402
+ .attr("width", t.boxSize)
403
+ .attr("height", t.boxSize)
404
+ .attr("class", "progress-svg")),
405
+ (this.g = this.svg
406
+ .append("g")
407
+ .attr(
408
+ "transform",
409
+ "translate(" + t.boxSize / 2 + "," + t.boxSize / 2 + ")"
410
+ )),
411
+ (this.meter1 = this.g
412
+ .append("g")
413
+ .attr("class", "progress-meter")),
414
+ this.meter1
415
+ .append("path")
416
+ .attr("class", "background")
417
+ .attr("fill", "#ccc")
418
+ .attr("fill-opacity", 0.5)
419
+ .attr("d", this.arc.endAngle(t.twoPi)),
420
+ (this.numberText = this.meter1
421
+ .append("text")
422
+ .attr("fill", "#000")
423
+ .attr("text-anchor", "middle")
424
+ .attr("dy", ".35em")),
425
+ (this.meter2 = this.g
426
+ .append("g")
427
+ .attr("class", "progress-meter")),
428
+ (this.frontSuccess = this.meter2
429
+ .append("path")
430
+ .attr("class", "foreground")
431
+ .attr("fill", t.colors.green)
432
+ .attr("fill-opacity", 1)),
433
+ (this.meter3 = this.g
434
+ .append("g")
435
+ .attr("class", "progress-meter")),
436
+ (this.frontFail = this.meter3
437
+ .append("path")
438
+ .attr("class", "foreground")
439
+ .attr("fill", t.colors.red)
440
+ .attr("fill-opacity", 1));
441
+ }),
442
+ (t.prototype.update = function (e, n, o, i, r) {
443
+ var a = ko.utils.unwrapObservable(n());
444
+ this.frontSuccess.attr(
445
+ "d",
446
+ this.arc.startAngle(0).endAngle(t.twoPi * a.successProgress)
447
+ ),
448
+ this.frontFail.attr(
449
+ "d",
450
+ this.arc
451
+ .startAngle(t.twoPi * a.successProgress)
452
+ .endAngle(t.twoPi * a.totalProgress)
453
+ ),
454
+ this.numberText.text(t.formatPercent(a.totalProgress));
455
+ }),
456
+ (t.colors = { red: "#D13438", green: "#7fba00" }),
457
+ (t.radius = 80),
458
+ (t.border = 10),
459
+ (t.padding = 20),
460
+ (t.twoPi = 2 * Math.PI),
461
+ (t.formatPercent = d3.format("%")),
462
+ (t.boxSize = 2 * (t.radius + t.padding)),
463
+ t
464
+ );
465
+ })(),
466
+ u = (function () {
467
+ function u() {}
468
+ return (
469
+ (u.initialize = function () {
470
+ (ko.bindingHandlers.slide = new a()),
471
+ (ko.bindingHandlers.collapse = new o()),
472
+ (ko.bindingHandlers.jqueryUI = new e()),
473
+ (ko.bindingHandlers.shellComponent = new i()),
474
+ (ko.bindingHandlers.tabControl =
475
+ new t.Bindings.TabControlBinding()),
476
+ (ko.bindingHandlers.jsTree = new r()),
477
+ (ko.bindingHandlers.chartControl = new s()),
478
+ (ko.bindingHandlers.initHTML = new n()),
479
+ (ko.bindingHandlers.d3CircleProgress = new c());
480
+ }),
481
+ u
482
+ );
483
+ })();
484
+ t.BindingHandler = u;
485
+ })((e = t.Knockout || (t.Knockout = {})));
486
+ })((e = t.Application || (t.Application = {})));
487
+ })((e = t.DataStudio || (t.DataStudio = {})));
488
+ })(Microsoft || (Microsoft = {}));
489
+ var Microsoft;
490
+ !(function (t) {
491
+ var e;
492
+ !(function (t) {
493
+ var e;
494
+ !(function (t) {
495
+ var e;
496
+ !(function (t) {
497
+ var e = (function () {
498
+ function t() {}
499
+ return (
500
+ (t.prototype.getConfig = function (t, e) {
501
+ if (ko.components.isRegistered(t)) e(null);
502
+ else {
503
+ var n = this.getComponentURL(t),
504
+ o = this.getViewModelURI(n),
505
+ i = { require: o.toString() };
506
+ e(i);
507
+ }
508
+ }),
509
+ (t.prototype.loadTemplate = function (t, e, n) {
510
+ var o = this;
511
+ ko.components.defaultLoader.loadTemplate(t, e, function (e) {
512
+ o.convertResourceUriForComponent(t, e), n(e);
513
+ });
514
+ }),
515
+ (t.prototype.convertResourceUriForComponent = function (t, e) {
516
+ var n = this;
517
+ if (!t || 0 === t.length)
518
+ throw new Error("componentName is undefined or empty");
519
+ if (e) {
520
+ var o = $(e).find(
521
+ "img[src], script[src], iframe[src], embed[src], input[src]"
522
+ );
523
+ o.each(function (e, o) {
524
+ var i = o.getAttribute("src");
525
+ if (i) {
526
+ var r = new URI(i);
527
+ if (r.is("relative")) {
528
+ var a = n.getComponentURL(t).toString();
529
+ if (0 !== t.indexOf("uxshell")) {
530
+ var s = "datastudio-" + t.slice(0, t.indexOf("-"));
531
+ a = ModuleCatalog.getModuleRootUrl(s) + a;
532
+ }
533
+ (r = r.absoluteTo(a)),
534
+ (r = r.normalizePathname()),
535
+ o.setAttribute("src", r.toString());
536
+ }
537
+ }
538
+ });
539
+ }
540
+ }),
541
+ (t.prototype.getComponentURL = function (t) {
542
+ var e = t.split("-"),
543
+ n = new URI("");
544
+ return (
545
+ n.fragment(""),
546
+ "uxshell" !== e[0]
547
+ ? ((e[0] = "datastudio-" + e[0]), e.splice(1, 0, "views"))
548
+ : (e = ModuleCatalog.getModuleRootUrl("datastudio")
549
+ .split("/")
550
+ .concat(e)),
551
+ n.segment(e),
552
+ n.segment(""),
553
+ n
554
+ );
555
+ }),
556
+ (t.prototype.getViewModelURI = function (t) {
557
+ var e = t.clone(),
558
+ n = e.segment(),
559
+ o = n[n.length - 2];
560
+ return e.filename(o), e;
561
+ }),
562
+ t
563
+ );
564
+ })(),
565
+ n = (function () {
566
+ function t() {}
567
+ return (
568
+ (t.initialize = function () {
569
+ ko.components.loaders.unshift(new e());
570
+ }),
571
+ t
572
+ );
573
+ })();
574
+ t.ComponentLoader = n;
575
+ })((e = t.Knockout || (t.Knockout = {})));
576
+ })((e = t.Application || (t.Application = {})));
577
+ })((e = t.DataStudio || (t.DataStudio = {})));
578
+ })(Microsoft || (Microsoft = {})),
579
+ (ko = require("knockout"));
580
+ var Microsoft;
581
+ !(function (t) {
582
+ var e;
583
+ !(function (t) {
584
+ var e;
585
+ !(function (t) {
586
+ var e = (function () {
587
+ function e() {}
588
+ return (
589
+ (e.initialize = function (n) {
590
+ var o = /^\/\??([^\/?]+)\/([^\/]+)\/?([^\?]*)\/?(\?.*?)?$/,
591
+ i = "",
592
+ r = [o, i];
593
+ r.forEach(function (e) {
594
+ crossroads.addRoute(e, function (e, n, o, i) {
595
+ var r = {
596
+ module: e,
597
+ view: n,
598
+ arguments: o,
599
+ url: document.location.pathname + document.location.search,
600
+ query: i || null,
601
+ };
602
+ (r.module && 0 !== r.module.indexOf("id_token")) ||
603
+ (r.module = e),
604
+ r.view ||
605
+ (r.view = ModuleCatalog.getModule("datastudio-" + r.module)
606
+ .moduleContext.moduleConfig()
607
+ .defaultViewName()),
608
+ t.Router.currentModule(r.module),
609
+ t.Router.currentView(r.view),
610
+ t.Router.currentArguments(r.arguments),
611
+ t.Router.currentQuery(r.query),
612
+ t.Router.currentRoute(r);
613
+ });
614
+ }),
615
+ t.Router.currentView.subscribe(t.Router.emptyViewSubscriptions),
616
+ crossroads.parse(
617
+ document.location.pathname + document.location.search
618
+ ),
619
+ Historyjs.Adapter.bind(window, "statechange", function () {
620
+ crossroads.parse(
621
+ document.location.pathname + document.location.search
622
+ );
623
+ }),
624
+ $("body").on("click", "a", e.onAnchorNavigated);
625
+ }),
626
+ (e.registerViewSubscription = function (e, n, o) {
627
+ e in t.Router.currentViewSubscriptions() ||
628
+ (t.Router.currentViewSubscriptions()[e] = n.subscribe(o));
629
+ }),
630
+ (e.emptyViewSubscriptions = function () {
631
+ Object.keys(t.Router.currentViewSubscriptions()).forEach(function (
632
+ e
633
+ ) {
634
+ t.Router.currentViewSubscriptions()[e].dispose();
635
+ }),
636
+ t.Router.currentViewSubscriptions({});
637
+ }),
638
+ (e.navigate = function (t, e, n) {
639
+ window.Historyjs &&
640
+ ("?" !== t[0] && (t = "?".concat(t)),
641
+ Historyjs.pushState(e, n, t));
642
+ }),
643
+ (e.onAnchorNavigated = function (e) {
644
+ var n = $(this).attr("href");
645
+ return !n ||
646
+ "" === n ||
647
+ 0 === n.indexOf("#") ||
648
+ /^http(s?):\/\//.test(n)
649
+ ? !0
650
+ : (e.preventDefault(),
651
+ e.stopPropagation(),
652
+ void t.Router.navigate(n));
653
+ }),
654
+ (e.currentRoute = ko.observable({}).extend({ throttle: 1 })),
655
+ (e.currentModule = ko.observable(null).extend({ throttle: 1 })),
656
+ (e.currentView = ko.observable(null).extend({ throttle: 1 })),
657
+ (e.currentArguments = ko.observable(null).extend({ throttle: 1 })),
658
+ (e.currentQuery = ko.observable(null).extend({ throttle: 1 })),
659
+ (e.currentViewSubscriptions = ko.observable({})),
660
+ e
661
+ );
662
+ })();
663
+ (t.RouterImpl = e), (t.Router = e);
664
+ })((e = t.Application || (t.Application = {})));
665
+ })((e = t.DataStudio || (t.DataStudio = {})));
666
+ })(Microsoft || (Microsoft = {}));
667
+ var Microsoft;
668
+ !(function (t) {
669
+ var e;
670
+ !(function (e) {
671
+ var n;
672
+ !(function (e) {
673
+ var n = (function () {
674
+ function n() {}
675
+ return (
676
+ (n.initialize = function (o) {
677
+ var i = e.LoggerFactory.getLogger({
678
+ loggerName: "ShellModulesInitializer",
679
+ }),
680
+ r = ModuleCatalog.getModules();
681
+ r.forEach(function (e) {
682
+ var o = new t.DataStudio.UxShell.ModuleContextImpl(e);
683
+ try {
684
+ e.initialize(o);
685
+ } catch (r) {
686
+ throw (
687
+ (i.logError(
688
+ "Module initialization failed for module: " + e.name,
689
+ { error: r }
690
+ ),
691
+ r)
692
+ );
693
+ }
694
+ i.logInfo(
695
+ "Module initialization completed successfully for module: " +
696
+ e.name
697
+ ),
698
+ n.moduleContexts.push(o);
699
+ var a = o.moduleConfig().globalLeftPanel;
700
+ a &&
701
+ n.GlobalLeftPanelElements(
702
+ n.GlobalLeftPanelElements().concat(a())
703
+ );
704
+ }),
705
+ (e.ShellContext.CurrentModuleContext = ko
706
+ .computed(function () {
707
+ var t = n.moduleContexts.filter(function (t) {
708
+ var e = o;
709
+ return t.moduleConfig().name() === e;
710
+ })[0];
711
+ return (
712
+ t ||
713
+ i.logError(
714
+ "Unable to find context for module:" +
715
+ e.Router.currentModule()
716
+ ),
717
+ t
718
+ );
719
+ })
720
+ .extend({
721
+ rateLimit: { timeout: 10, method: "notifyWhenChangesStop" },
722
+ })),
723
+ (e.ShellContext.CurrentModuleViewConfig = ko
724
+ .computed(function () {
725
+ var t = e.ShellContext.CurrentModuleContext(),
726
+ n = t
727
+ .moduleConfig()
728
+ .views()
729
+ .filter(function (t) {
730
+ return t.name() == e.Router.currentView();
731
+ })[0];
732
+ return (
733
+ !n &&
734
+ e.Router.currentView() &&
735
+ i.logError(
736
+ "Unable to find context for module: " +
737
+ e.Router.currentModule() +
738
+ ", view:" +
739
+ e.Router.currentView()
740
+ ),
741
+ n
742
+ );
743
+ })
744
+ .extend({
745
+ rateLimit: { timeout: 10, method: "notifyWhenChangesStop" },
746
+ }));
747
+ }),
748
+ (n.ShellName = "Shell"),
749
+ (n.globalSubscriptions = new ko.subscribable()),
750
+ (n.CurrentRoute = e.Router.currentRoute),
751
+ (n.GlobalLeftPanelElements = ko.observableArray([])),
752
+ (n.LoadDuration = null),
753
+ (n.LeftPanelIsExpanded = ko.observable(!0)),
754
+ (n.RightPanelIsExpanded = ko.observable(!0)),
755
+ (n.moduleContexts = []),
756
+ n
757
+ );
758
+ })();
759
+ e.ShellContextImpl = n;
760
+ })((n = e.Application || (e.Application = {})));
761
+ })((e = t.DataStudio || (t.DataStudio = {})));
762
+ })(Microsoft || (Microsoft = {}));
763
+ var Microsoft;
764
+ !(function (t) {
765
+ var e;
766
+ !(function (e) {
767
+ var n;
768
+ !(function (e) {
769
+ var n = t.DataStudio.Diagnostics.Logging,
770
+ o = (function () {
771
+ function t() {}
772
+ return (
773
+ (t.getLogger = function (e) {
774
+ return t.loggerFactory.getLogger(e);
775
+ }),
776
+ (t.loggerFactory = new n.LoggerFactory({
777
+ moduleName: "Application",
778
+ })),
779
+ t
780
+ );
781
+ })();
782
+ e.LoggerFactory = o;
783
+ })((n = e.Application || (e.Application = {})));
784
+ })((e = t.DataStudio || (t.DataStudio = {})));
785
+ })(Microsoft || (Microsoft = {}));
786
+ var Microsoft;
787
+ !(function (t) {
788
+ var e;
789
+ !(function (e) {
790
+ var n;
791
+ !(function (e) {
792
+ function n(t) {
793
+ var e = jwt.decode(t);
794
+ if (o.isDefined(e.puid)) {
795
+ if (!o.isString(e.puid))
796
+ return (
797
+ console.warn(
798
+ "Invalid PUID format: puid is present in the idToken, but it doesn't seem to be a string:",
799
+ e.puid
800
+ ),
801
+ ""
802
+ );
803
+ var n = e.puid,
804
+ i = /^[0-9A-Z]{16}$/;
805
+ return (
806
+ i.test(n) ||
807
+ console.warn(
808
+ "Invalid PUID format: puid as a string is present in the idToken, but it doesn't match our regex/understanding:",
809
+ n
810
+ ),
811
+ n
812
+ );
813
+ }
814
+ if (o.isDefined(e.altsecid)) {
815
+ if (!o.isString(e.altsecid))
816
+ return (
817
+ console.warn(
818
+ "Invalid PUID format: altsecid is present in the idToken, but it doesn't seem to be a string:",
819
+ e.altsecid
820
+ ),
821
+ ""
822
+ );
823
+ var r = e.altsecid,
824
+ a = /^1:live\.com:[0-9A-Z]{16}$/;
825
+ if (!a.test(r))
826
+ return (
827
+ console.warn(
828
+ "Invalid PUID format: altsecid as a string is present in the idToken, but it doesn't match our regex/understanding:",
829
+ r
830
+ ),
831
+ r
832
+ );
833
+ var s = r.split(":");
834
+ return s[2] + "@Live.com";
835
+ }
836
+ return (
837
+ console.warn(
838
+ "Invalid PUID format: Neither 'puid' nor 'altsecid' seems to be present in the idToken for this user, understand better?:",
839
+ e
840
+ ),
841
+ ""
842
+ );
843
+ }
844
+ var o = t.DataStudio.Diagnostics.TypeInfo;
845
+ e.extractPuid = n;
846
+ })((n = e.AuthHelpers || (e.AuthHelpers = {})));
847
+ })((e = t.DataStudio || (t.DataStudio = {})));
848
+ })(Microsoft || (Microsoft = {}));
849
+ var DiagnosticsHub = Microsoft.DataStudio.Diagnostics.Hub.DiagnosticsHub,
850
+ Logging = Microsoft.DataStudio.Diagnostics.Logging,
851
+ ObjectUtils = Microsoft.DataStudio.Diagnostics.ObjectUtils,
852
+ Resx = Microsoft.DataStudio.Application.Resx,
853
+ Microsoft;
854
+ !(function (t) {
855
+ var e;
856
+ !(function (e) {
857
+ var n;
858
+ !(function (e) {
859
+ function n() {
860
+ var t = $("[data-version]").attr("data-version"),
861
+ e = /(\d+)\.(\d+)$/.exec(t);
862
+ return e
863
+ ? moment("4/7/2007").add(e[1], "days").format("YYYYMMDD") + "." + e[2]
864
+ : "Unexpected format: " + t;
865
+ }
866
+ var o = (function () {
867
+ function n() {}
868
+ return (
869
+ (n.updateSplashStatus = function (t) {
870
+ document.getElementById("splash-status").innerText = t;
871
+ }),
872
+ (n.initializeAsync = function (o) {
873
+ var i = this,
874
+ r = Q.defer(),
875
+ a =
876
+ (t.DataStudio.Managers.ConfigurationManager.instance,
877
+ t.DataStudio.Managers.AuthenticationManager.instance);
878
+ return (
879
+ n.updateSplashStatus(e.Resx.splashauthorizing),
880
+ a
881
+ .initializeAsync(n.getTenantIdFromUrl(window.location.href))
882
+ .then(
883
+ function () {
884
+ (PERF_OBJ.LOADING_STAGE7 = new Date().getTime()),
885
+ i.initializeDiagnostics(a, o);
886
+ var t = e.LoggerFactory.getLogger({
887
+ loggerName: "Bootstrapper",
888
+ });
889
+ try {
890
+ var n = i.coreInitialize(t, o);
891
+ n.then(
892
+ function (e) {
893
+ t.logInfo(
894
+ "Application bootstrapper promise succeeded!"
895
+ );
896
+ },
897
+ function (e) {
898
+ t.logError(
899
+ "Application bootstrapper promise failed!",
900
+ { error: e }
901
+ );
902
+ }
903
+ ),
904
+ r.resolve(n);
905
+ } catch (s) {
906
+ throw (
907
+ (t.logError("Application bootstrapping failed!", {
908
+ error: s,
909
+ }),
910
+ r.reject(s),
911
+ s)
912
+ );
913
+ }
914
+ },
915
+ function (t) {
916
+ t !== !0 &&
917
+ (console.error(
918
+ "Could not initialize authentication workflow.",
919
+ t
920
+ ),
921
+ r.reject(t));
922
+ }
923
+ ),
924
+ r.promise
925
+ );
926
+ }),
927
+ (n.coreInitialize = function (t, o) {
928
+ t.logInfo("BEGIN Application.Bootstrapper.coreInitialize()"),
929
+ e.Knockout.BindingHandler.initialize(),
930
+ e.Knockout.ComponentLoader.initialize();
931
+ var i = new Promise(function (t, i) {
932
+ requirejs.config({ packages: o.modules }),
933
+ (e.ShellContext = e.ShellContextImpl);
934
+ var r = ["history"];
935
+ if (
936
+ (n.updateSplashStatus(e.Resx.splashloadingmodules),
937
+ SHOULD_LOG_PERFORMANCE)
938
+ ) {
939
+ e.ShellContext.LoadDuration =
940
+ new Date().getTime() - MICROSOFT_DATASTUDIO_LOAD_START;
941
+ for (var a = 1; PERF_OBJ["LOADING_STAGE" + a]; )
942
+ (e.ShellContext["LoadDuration" + a] =
943
+ PERF_OBJ["LOADING_STAGE" + a] -
944
+ MICROSOFT_DATASTUDIO_LOAD_START),
945
+ a++;
946
+ }
947
+ var s = "datafactory",
948
+ c = "datafactoryv2",
949
+ u = "";
950
+ -1 === window.location.href.indexOf("?datafactoryv2/")
951
+ ? (r.push("datastudio-datafactory"), (u = s))
952
+ : (r.push("datastudio-datafactoryv2"), (u = c)),
953
+ requirejs(r, function () {
954
+ (Historyjs = History),
955
+ e.ShellContext.initialize(u),
956
+ e.Router.initialize(u),
957
+ ko.applyBindings({ route: e.Router.currentRoute }),
958
+ t();
959
+ });
960
+ var l = $("#splash-container");
961
+ l.fadeOut(100, function () {
962
+ l.remove();
963
+ });
964
+ });
965
+ return (
966
+ t.logInfo("END Application.Bootstrapper.coreInitialize()"), i
967
+ );
968
+ }),
969
+ (n.initializeDiagnostics = function (e, n) {
970
+ DiagnosticsHub.configureEndpoint(
971
+ t.DataStudio.Application.Environment.getAPIUrl(
972
+ "diagnosticshub/publish",
973
+ n.useExternalAPI
974
+ )
975
+ ),
976
+ DiagnosticsHub.configureSession({
977
+ sessionId: e.getCurrentUser().sessionId || "",
978
+ userId: e.getCurrentUser().puid || "",
979
+ }),
980
+ DiagnosticsHub.configureSusbscription({
981
+ subscriptionId: "00000000-0000-0000-0000-000000000000",
982
+ resourceGroupName: "",
983
+ resourceName: "",
984
+ provider: "",
985
+ });
986
+ }),
987
+ (n.getTenantIdFromUrl = function (t) {
988
+ var e;
989
+ if (t) {
990
+ var n = t.match(/[\?&]tenantId=([^\?&\s]*)/);
991
+ n && n[1] && (e = n[1]);
992
+ }
993
+ return e;
994
+ }),
995
+ n
996
+ );
997
+ })();
998
+ (e.Bootstrapper = o), (e.BuildNumber = n);
999
+ })((n = e.Application || (e.Application = {})));
1000
+ })((e = t.DataStudio || (t.DataStudio = {})));
1001
+ })(Microsoft || (Microsoft = {}));
1002
+ var Microsoft;
1003
+ !(function (t) {
1004
+ var e;
1005
+ !(function (e) {
1006
+ var n;
1007
+ !(function (n) {
1008
+ var o = (function () {
1009
+ function n() {
1010
+ if (n._instance)
1011
+ throw new Error(
1012
+ "Error: Instantiation failed: USE [Microsoft.DataStudio.Managers.AuthenticationManager.instance] instead of new."
1013
+ );
1014
+ (n._instance = this),
1015
+ (this.authLogger = e.Application.LoggerFactory.getLogger({
1016
+ loggerName: "ConfigurationManager",
1017
+ }));
1018
+ }
1019
+ return (
1020
+ Object.defineProperty(n, "instance", {
1021
+ get: function () {
1022
+ return n._instance;
1023
+ },
1024
+ enumerable: !0,
1025
+ configurable: !0,
1026
+ }),
1027
+ (n.prototype.initializeAsync = function (e) {
1028
+ var n = this,
1029
+ o = Q.defer(),
1030
+ i = $.ajax(
1031
+ t.DataStudio.Application.Environment.getAPIUrl(
1032
+ "config",
1033
+ e.useExternalAPI
1034
+ ),
1035
+ { type: "GET" }
1036
+ );
1037
+ return (
1038
+ i
1039
+ .done(function (t) {
1040
+ t
1041
+ ? ((n.config = t),
1042
+ n.authLogger.logInfo(
1043
+ "Successfully got Configuration from the server",
1044
+ { url: n.config.DataServiceEndpoint }
1045
+ ),
1046
+ o.resolve(t))
1047
+ : o.reject(new Error("Configuration is null"));
1048
+ })
1049
+ .fail(function (t) {
1050
+ n.authLogger.logError(
1051
+ "Failed to get the Configuration from the server"
1052
+ ),
1053
+ o.reject(t);
1054
+ }),
1055
+ o.promise
1056
+ );
1057
+ }),
1058
+ (n.prototype.getApiEndpointUrl = function () {
1059
+ return this.config && this.config.DataServiceEndpoint
1060
+ ? this.config.DataServiceEndpoint
1061
+ : "";
1062
+ }),
1063
+ (n.prototype.getGalleryEndpointUrl = function () {
1064
+ return this.config && this.config.GalleryEndpoint
1065
+ ? this.config.GalleryEndpoint
1066
+ : "";
1067
+ }),
1068
+ (n.prototype.getADCEndpoint = function () {
1069
+ return this.config && this.config.ADCEndpoint
1070
+ ? this.config.ADCEndpoint
1071
+ : "";
1072
+ }),
1073
+ (n._instance = new n()),
1074
+ n
1075
+ );
1076
+ })();
1077
+ n.ConfigurationManager = o;
1078
+ })((n = e.Managers || (e.Managers = {})));
1079
+ })((e = t.DataStudio || (t.DataStudio = {})));
1080
+ })(Microsoft || (Microsoft = {}));
1081
+ var Microsoft;
1082
+ !(function (t) {
1083
+ var e;
1084
+ !(function (t) {
1085
+ var e;
1086
+ !(function (t) {
1087
+ var e;
1088
+ !(function (t) {
1089
+ var e = (function () {
1090
+ function t() {
1091
+ this.storage = {};
1092
+ }
1093
+ return (
1094
+ (t.getInstance = function () {
1095
+ return t._instance || (t._instance = new t()), t._instance;
1096
+ }),
1097
+ (t.prototype.getItem = function (t) {
1098
+ return t
1099
+ ? Promise.resolve(this.getByPath(t))
1100
+ : Promise.reject(new Error("path is null or undefined."));
1101
+ }),
1102
+ (t.prototype.setItem = function (t, e) {
1103
+ return t
1104
+ ? (this.setByPath(t, e), Promise.resolve())
1105
+ : Promise.reject(new Error("path is null or undefined."));
1106
+ }),
1107
+ (t.prototype.getByPath = function (t) {
1108
+ var e = this.storage;
1109
+ (t = t.replace(/\[(\w+)\]/g, ".$1")), (t = t.replace(/^\./, ""));
1110
+ for (var n = t.split("."), o = 0, i = n.length; i > o; ++o) {
1111
+ var r = n[o];
1112
+ if (!(r in e)) return;
1113
+ e = e[r];
1114
+ }
1115
+ return e;
1116
+ }),
1117
+ (t.prototype.setByPath = function (t, e) {
1118
+ var n = this.storage;
1119
+ (t = t.replace(/\[(\w+)\]/g, ".$1")), (t = t.replace(/^\./, ""));
1120
+ for (var o = t.split("."), i = 0, r = o.length - 1; r > i; ++i) {
1121
+ var a = o[i];
1122
+ n = a in n ? n[a] : (n[a] = {});
1123
+ }
1124
+ n[o[o.length - 1]] = e;
1125
+ }),
1126
+ t
1127
+ );
1128
+ })();
1129
+ t.LocalStorageManager = e;
1130
+ })((e = t.Managers || (t.Managers = {})));
1131
+ })((e = t.Framework || (t.Framework = {})));
1132
+ })((e = t.DataStudio || (t.DataStudio = {})));
1133
+ })(Microsoft || (Microsoft = {}));
1134
+ var Microsoft;
1135
+ !(function (t) {
1136
+ var e;
1137
+ !(function (e) {
1138
+ var n;
1139
+ !(function (n) {
1140
+ var o = t.DataStudio.Application.Resx;
1141
+ (function () {
1142
+ function t() {
1143
+ if (
1144
+ ((this.currentUser = {
1145
+ name: "Guest",
1146
+ email: null,
1147
+ puid: null,
1148
+ token: null,
1149
+ sessionId: null,
1150
+ subscriptions: null,
1151
+ }),
1152
+ (this._isSessionTimedout = !1),
1153
+ (this.ShowSessionTimeoutNotification = function () {
1154
+ var t = $('<div class="session-timeout-container"></div>'),
1155
+ e = $('<div class="fade-box"></div>'),
1156
+ n = $('<div class="notification-bar"></div>'),
1157
+ i = $(
1158
+ '<div class="notification-bar-message">Your session has timed out. Please click the OK button to login again.</div>'
1159
+ ).text(o.yourSessionHasTimedOut),
1160
+ r = $(
1161
+ '<input type="button" value="OK" class="btn btn-primary">'
1162
+ );
1163
+ i.append(r),
1164
+ n.append(i),
1165
+ t.append(e),
1166
+ t.append(n),
1167
+ r.click(function (t) {
1168
+ window.location.reload();
1169
+ }),
1170
+ $("body").append(t);
1171
+ }),
1172
+ (this.TokenHeartBeatHandler = function () {
1173
+ var t = this;
1174
+ if (null != this.token) {
1175
+ var e = jwt.decode(this.token.idTokenRawValue);
1176
+ this.authLogger.logInfo("initiating heartbeat", {
1177
+ username: e.given_name,
1178
+ puid: this.currentUser.puid,
1179
+ timestamp2: new Date(Date.now()),
1180
+ });
1181
+ var n = this.getTokenAsync();
1182
+ n.done(function (e) {
1183
+ t.token = e;
1184
+ }),
1185
+ n.fail(function (t) {});
1186
+ }
1187
+ }),
1188
+ t._instance)
1189
+ )
1190
+ throw new Error(
1191
+ "Error: Instantiation failed: USE [Microsoft.DataStudio.Managers.AuthenticationManager.instance] instead of new."
1192
+ );
1193
+ (t._instance = this),
1194
+ (this.authLogger = e.Application.LoggerFactory.getLogger({
1195
+ loggerName: "ServerAuthenticationManager",
1196
+ })),
1197
+ setInterval(
1198
+ (function (t) {
1199
+ return function () {
1200
+ t.TokenHeartBeatHandler();
1201
+ };
1202
+ })(this),
1203
+ 48e4
1204
+ );
1205
+ }
1206
+ return (
1207
+ Object.defineProperty(t, "instance", {
1208
+ get: function () {
1209
+ return t._instance;
1210
+ },
1211
+ enumerable: !0,
1212
+ configurable: !0,
1213
+ }),
1214
+ (t.prototype.initializeAsync = function () {
1215
+ var t = this,
1216
+ n = Q.defer(),
1217
+ o = this.getTokenAsync();
1218
+ return (
1219
+ o.done(function (o) {
1220
+ if (null != o.idTokenRawValue) {
1221
+ var i = jwt.decode(o.idTokenRawValue);
1222
+ (t.currentUser = {
1223
+ name: i.given_name,
1224
+ email: o.email,
1225
+ puid: e.AuthHelpers.extractPuid(o.idTokenRawValue),
1226
+ token: i,
1227
+ sessionId: o.sessionId,
1228
+ subscriptions: o.subscriptions,
1229
+ }),
1230
+ t.authLogger.logInfo("Jwt Token successfully retreived", {
1231
+ username: i.given_name,
1232
+ mergedtoken: o,
1233
+ }),
1234
+ n.resolve(o);
1235
+ } else n.reject(new Error("Error retrieved id token."));
1236
+ }),
1237
+ o.fail(function (t) {
1238
+ n.reject(t);
1239
+ }),
1240
+ n.promise
1241
+ );
1242
+ }),
1243
+ (t.prototype.login = function () {}),
1244
+ (t.prototype.logout = function () {}),
1245
+ (t.prototype.getAccessToken = function (t) {
1246
+ var e = this;
1247
+ t && (t = t.toLowerCase());
1248
+ var n = Q.defer();
1249
+ if (null != this.token)
1250
+ if (this._isSessionTimedout)
1251
+ n.reject("Session timed out. Please reload page.");
1252
+ else if (null !== t) {
1253
+ var o = $.grep(this.currentUser.subscriptions, function (e) {
1254
+ return e.subscriptionid.toLowerCase() == t;
1255
+ });
1256
+ o.length > 0
1257
+ ? n.resolve(o[0].access_token)
1258
+ : n.reject(
1259
+ "Provided subscription does not belong to current user."
1260
+ );
1261
+ } else n.reject("Subscription id not provided ");
1262
+ else {
1263
+ var i = this.getTokenAsync();
1264
+ i.done(function (o) {
1265
+ if (((e.token = o), null != e.token.subscriptions))
1266
+ if (null !== t) {
1267
+ var i = $.grep(e.currentUser.subscriptions, function (e) {
1268
+ return e.subscriptionid.toLowerCase() == t;
1269
+ });
1270
+ i.length > 0
1271
+ ? n.resolve(i[0].access_token)
1272
+ : n.reject(
1273
+ "Provided subscription does not belong to current user."
1274
+ );
1275
+ } else n.reject("Subscription id not provided ");
1276
+ else n.reject(e.token.message), (e.token = null);
1277
+ }),
1278
+ i.fail(function (t) {
1279
+ e._isSessionTimedout ||
1280
+ (e.ShowSessionTimeoutNotification(),
1281
+ (e._isSessionTimedout = !0)),
1282
+ n.reject(t);
1283
+ });
1284
+ }
1285
+ return n.promise;
1286
+ }),
1287
+ (t.prototype.getAccessTokenADC = function (t) {
1288
+ return Q("");
1289
+ }),
1290
+ (t.prototype.getCurrentUser = function () {
1291
+ return this.currentUser;
1292
+ }),
1293
+ (t.prototype.getTokenAsync = function () {
1294
+ var t = this,
1295
+ e = Q.defer(),
1296
+ n = $.ajax("/token", {
1297
+ type: "POST",
1298
+ data: "grant_type=client_credentials",
1299
+ });
1300
+ return (
1301
+ n
1302
+ .done(function (n) {
1303
+ var o = JSON.parse(n.access_token);
1304
+ null != o &&
1305
+ (null == o.message
1306
+ ? ((t.token = o), e.resolve(o))
1307
+ : e.reject(new Error(o.message))),
1308
+ e.reject(new Error("Error retreiving token from server"));
1309
+ })
1310
+ .fail(function (n) {
1311
+ null != n.responseJSON &&
1312
+ "invalid_client" == n.responseJSON.error &&
1313
+ (t._isSessionTimedout ||
1314
+ (t.ShowSessionTimeoutNotification(),
1315
+ (t._isSessionTimedout = !0))),
1316
+ e.reject(n);
1317
+ }),
1318
+ e.promise
1319
+ );
1320
+ }),
1321
+ (t._instance = new t()),
1322
+ t
1323
+ );
1324
+ })();
1325
+ })((n = e.Managers || (e.Managers = {})));
1326
+ })((e = t.DataStudio || (t.DataStudio = {})));
1327
+ })(Microsoft || (Microsoft = {}));
1328
+ var Microsoft;
1329
+ !(function (t) {
1330
+ var e;
1331
+ !(function (t) {
1332
+ var e;
1333
+ !(function (t) {
1334
+ var e = (function () {
1335
+ function t() {
1336
+ this.data = {};
1337
+ }
1338
+ return (
1339
+ (t.prototype.Get = function (t) {
1340
+ return this.data[t];
1341
+ }),
1342
+ (t.prototype.Set = function (t, e) {
1343
+ this.data[t] = e;
1344
+ }),
1345
+ (t.prototype.Clear = function (t) {
1346
+ this.data[t] = null;
1347
+ }),
1348
+ t
1349
+ );
1350
+ })();
1351
+ t.DataStore = e;
1352
+ var n = (function () {
1353
+ function t() {
1354
+ if (((this.dataStore = new e()), t._instance))
1355
+ throw new Error(
1356
+ "Error: Instantiation failed: USE [Microsoft.DataStudio.Services.DataHandler.instance] instead of new."
1357
+ );
1358
+ t._instance = this;
1359
+ }
1360
+ return (
1361
+ (t.GetInstance = function () {
1362
+ return t._instance;
1363
+ }),
1364
+ (t.prototype.GetData = function (t) {
1365
+ var e = null;
1366
+ return (
1367
+ t.useCache && (e = this.dataStore.Get(t.url)),
1368
+ e || ((e = Q(jQuery.ajax(t))), this.dataStore.Set(t.url, e)),
1369
+ e
1370
+ );
1371
+ }),
1372
+ (t.prototype.VoidData = function (t) {
1373
+ this.dataStore.Clear(t);
1374
+ }),
1375
+ (t._instance = new t()),
1376
+ t
1377
+ );
1378
+ })();
1379
+ (t.DataHandlerImpl = n), (t.DataHandler = n);
1380
+ })((e = t.Services || (t.Services = {})));
1381
+ })((e = t.DataStudio || (t.DataStudio = {})));
1382
+ })(Microsoft || (Microsoft = {}));
1383
+ var Microsoft;
1384
+ !(function (t) {
1385
+ var e;
1386
+ !(function (t) {
1387
+ var e;
1388
+ !(function (t) {
1389
+ var e = (function () {
1390
+ function t() {
1391
+ this.shellConfigMock = {
1392
+ defaultModuleName: "blueprint",
1393
+ modules: [
1394
+ {
1395
+ name: "datastudio-blueprint",
1396
+ location: "node_modules/@ms-atlas-module/datastudio-blueprint",
1397
+ main: "module",
1398
+ },
1399
+ {
1400
+ name: "datastudio-machinelearning",
1401
+ location:
1402
+ "node_modules/@ms-atlas-module/datastudio-machinelearning",
1403
+ main: "startup",
1404
+ },
1405
+ {
1406
+ name: "datastudio-datafactory",
1407
+ location:
1408
+ "node_modules/@ms-atlas-module/datastudio-datafactory",
1409
+ main: "bootstrapper/startup",
1410
+ },
1411
+ {
1412
+ name: "datastudio-datafactoryv2",
1413
+ location:
1414
+ "node_modules/@ms-atlas-module/datastudio-datafactoryv2",
1415
+ main: "bootstrapper/startup",
1416
+ },
1417
+ {
1418
+ name: "datastudio-dataconnect",
1419
+ location:
1420
+ "node_modules/@ms-atlas-module/datastudio-dataconnect",
1421
+ main: "service/main",
1422
+ },
1423
+ {
1424
+ name: "datastudio-streamanalytics",
1425
+ location:
1426
+ "node_modules/@ms-atlas-module/datastudio-streamanalytics",
1427
+ main: "startup",
1428
+ },
1429
+ {
1430
+ name: "datastudio-crystal",
1431
+ location: "node_modules/@ms-atlas-module/datastudio-crystal",
1432
+ main: "startup",
1433
+ },
1434
+ {
1435
+ name: "datastudio-solutionaccelerator",
1436
+ location:
1437
+ "node_modules/@ms-atlas-module/datastudio-solutionaccelerator",
1438
+ main: "startup",
1439
+ },
1440
+ ],
1441
+ };
1442
+ }
1443
+ return (
1444
+ (t.prototype.getUserConfigAsync = function (t) {
1445
+ return Promise.resolve(this.shellConfigMock);
1446
+ }),
1447
+ t
1448
+ );
1449
+ })();
1450
+ t.ShellConfigServiceImpl = e;
1451
+ })((e = t.Services || (t.Services = {})));
1452
+ })((e = t.DataStudio || (t.DataStudio = {})));
1453
+ })(Microsoft || (Microsoft = {}));
1454
+ var Microsoft;
1455
+ !(function (t) {
1456
+ var e;
1457
+ !(function (t) {
1458
+ var e;
1459
+ !(function (t) {
1460
+ var e = (function () {
1461
+ function t(t) {
1462
+ (this.moduleConfig = ko.observable({})),
1463
+ (this.mainInputValue = ko.observable(null)),
1464
+ (this.mainActionButtons = ko.observableArray([])),
1465
+ (this._moduleInstance = t);
1466
+ }
1467
+ return t;
1468
+ })();
1469
+ t.ModuleContextImpl = e;
1470
+ })((e = t.UxShell || (t.UxShell = {})));
1471
+ })((e = t.DataStudio || (t.DataStudio = {})));
1472
+ })(Microsoft || (Microsoft = {}));
1473
+ var Microsoft;
1474
+ !(function (t) {
1475
+ var e;
1476
+ !(function (t) {
1477
+ var e;
1478
+ !(function (t) {
1479
+ var e;
1480
+ !(function (t) {
1481
+ var e = (function () {
1482
+ function t() {
1483
+ this.bag = [];
1484
+ }
1485
+ return (
1486
+ (t.prototype.addEventListener = function (t, e, n, o) {
1487
+ t.addEventListener(e, n, o), this.bag.push([t, e, n]);
1488
+ }),
1489
+ (t.prototype.removeEventListeners = function () {
1490
+ for (; this.bag.length > 0; ) {
1491
+ var t = this.bag.pop();
1492
+ t[0].removeEventListener(t[1], t[2]);
1493
+ }
1494
+ }),
1495
+ t
1496
+ );
1497
+ })();
1498
+ t.EventListenerBag = e;
1499
+ })((e = t.Knockout || (t.Knockout = {})));
1500
+ })((e = t.Application || (t.Application = {})));
1501
+ })((e = t.DataStudio || (t.DataStudio = {})));
1502
+ })(Microsoft || (Microsoft = {}));