@memberstack/dom 1.9.3 → 1.9.6
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.
- package/lib/auth/index.js +14 -20
- package/lib/index.d.ts +752 -32
- package/lib/methods/dom/main-dom.js +2344 -588
- package/lib/methods/dom/methods.d.ts +1 -1
- package/lib/methods/dom/methods.js +11 -18
- package/lib/methods/index.d.ts +754 -32
- package/lib/methods/index.js +4 -2
- package/lib/methods/requests/index.d.ts +4 -2
- package/lib/methods/requests/index.js +44 -28
- package/lib/methods/requests/requests.d.ts +3 -1
- package/lib/methods/requests/requests.js +17 -17
- package/lib/types/index.js +2 -6
- package/lib/types/utils/payloads.d.ts +16 -9
- package/lib/utils/cookies.js +3 -5
- package/package.json +1 -1
|
@@ -3,12 +3,10 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
10
|
extendStatics(d, b);
|
|
13
11
|
function __() { this.constructor = d; }
|
|
14
12
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -66,18 +64,25 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
66
64
|
}
|
|
67
65
|
return ar;
|
|
68
66
|
};
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
var __spread = (this && this.__spread) || function () {
|
|
68
|
+
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
69
|
+
return ar;
|
|
70
|
+
};
|
|
71
|
+
var __values = (this && this.__values) || function(o) {
|
|
72
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
73
|
+
if (m) return m.call(o);
|
|
74
|
+
if (o && typeof o.length === "number") return {
|
|
75
|
+
next: function () {
|
|
76
|
+
if (o && i >= o.length) o = void 0;
|
|
77
|
+
return { value: o && o[i++], done: !o };
|
|
74
78
|
}
|
|
75
|
-
}
|
|
76
|
-
|
|
79
|
+
};
|
|
80
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
77
81
|
};
|
|
78
82
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
79
83
|
exports.default = void 0;
|
|
80
84
|
function noop() { }
|
|
85
|
+
var identity = function (x) { return x; };
|
|
81
86
|
function run(fn) {
|
|
82
87
|
return fn();
|
|
83
88
|
}
|
|
@@ -93,9 +98,64 @@ function is_function(thing) {
|
|
|
93
98
|
function safe_not_equal(a, b) {
|
|
94
99
|
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
|
|
95
100
|
}
|
|
101
|
+
var src_url_equal_anchor;
|
|
102
|
+
function src_url_equal(element_src, url) {
|
|
103
|
+
if (!src_url_equal_anchor) {
|
|
104
|
+
src_url_equal_anchor = document.createElement('a');
|
|
105
|
+
}
|
|
106
|
+
src_url_equal_anchor.href = url;
|
|
107
|
+
return element_src === src_url_equal_anchor.href;
|
|
108
|
+
}
|
|
96
109
|
function is_empty(obj) {
|
|
97
110
|
return Object.keys(obj).length === 0;
|
|
98
111
|
}
|
|
112
|
+
function subscribe(store) {
|
|
113
|
+
var callbacks = [];
|
|
114
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
115
|
+
callbacks[_i - 1] = arguments[_i];
|
|
116
|
+
}
|
|
117
|
+
if (store == null) {
|
|
118
|
+
return noop;
|
|
119
|
+
}
|
|
120
|
+
var unsub = store.subscribe.apply(store, __spread(callbacks));
|
|
121
|
+
return unsub.unsubscribe ? function () { return unsub.unsubscribe(); } : unsub;
|
|
122
|
+
}
|
|
123
|
+
function component_subscribe(component, store, callback) {
|
|
124
|
+
component.$$.on_destroy.push(subscribe(store, callback));
|
|
125
|
+
}
|
|
126
|
+
var is_client = typeof window !== 'undefined';
|
|
127
|
+
var now = is_client
|
|
128
|
+
? function () { return window.performance.now(); }
|
|
129
|
+
: function () { return Date.now(); };
|
|
130
|
+
var raf = is_client ? function (cb) { return requestAnimationFrame(cb); } : noop;
|
|
131
|
+
var tasks = new Set();
|
|
132
|
+
function run_tasks(now) {
|
|
133
|
+
tasks.forEach(function (task) {
|
|
134
|
+
if (!task.c(now)) {
|
|
135
|
+
tasks.delete(task);
|
|
136
|
+
task.f();
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
if (tasks.size !== 0)
|
|
140
|
+
raf(run_tasks);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Creates a new task that runs on each raf frame
|
|
144
|
+
* until it returns a falsy value or is aborted
|
|
145
|
+
*/
|
|
146
|
+
function loop(callback) {
|
|
147
|
+
var task;
|
|
148
|
+
if (tasks.size === 0)
|
|
149
|
+
raf(run_tasks);
|
|
150
|
+
return {
|
|
151
|
+
promise: new Promise(function (fulfill) {
|
|
152
|
+
tasks.add(task = { c: callback, f: fulfill });
|
|
153
|
+
}),
|
|
154
|
+
abort: function () {
|
|
155
|
+
tasks.delete(task);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
99
159
|
function append(target, node) {
|
|
100
160
|
target.appendChild(node);
|
|
101
161
|
}
|
|
@@ -117,6 +177,11 @@ function get_root_for_style(node) {
|
|
|
117
177
|
}
|
|
118
178
|
return node.ownerDocument;
|
|
119
179
|
}
|
|
180
|
+
function append_empty_stylesheet(node) {
|
|
181
|
+
var style_element = element('style');
|
|
182
|
+
append_stylesheet(get_root_for_style(node), style_element);
|
|
183
|
+
return style_element.sheet;
|
|
184
|
+
}
|
|
120
185
|
function append_stylesheet(node, style) {
|
|
121
186
|
append(node.head || node, style);
|
|
122
187
|
}
|
|
@@ -144,6 +209,9 @@ function text(data) {
|
|
|
144
209
|
function space() {
|
|
145
210
|
return text(' ');
|
|
146
211
|
}
|
|
212
|
+
function empty() {
|
|
213
|
+
return text('');
|
|
214
|
+
}
|
|
147
215
|
function listen(node, event, handler, options) {
|
|
148
216
|
node.addEventListener(event, handler, options);
|
|
149
217
|
return function () { return node.removeEventListener(event, handler, options); };
|
|
@@ -176,6 +244,9 @@ function set_data(text, data) {
|
|
|
176
244
|
if (text.wholeText !== data)
|
|
177
245
|
text.data = data;
|
|
178
246
|
}
|
|
247
|
+
function set_input_value(input, value) {
|
|
248
|
+
input.value = value == null ? '' : value;
|
|
249
|
+
}
|
|
179
250
|
function set_style(node, key, value, important) {
|
|
180
251
|
if (value === null) {
|
|
181
252
|
node.style.removeProperty(key);
|
|
@@ -187,6 +258,78 @@ function set_style(node, key, value, important) {
|
|
|
187
258
|
function toggle_class(element, name, toggle) {
|
|
188
259
|
element.classList[toggle ? 'add' : 'remove'](name);
|
|
189
260
|
}
|
|
261
|
+
function custom_event(type, detail, _a) {
|
|
262
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.bubbles, bubbles = _c === void 0 ? false : _c, _d = _b.cancelable, cancelable = _d === void 0 ? false : _d;
|
|
263
|
+
var e = document.createEvent('CustomEvent');
|
|
264
|
+
e.initCustomEvent(type, bubbles, cancelable, detail);
|
|
265
|
+
return e;
|
|
266
|
+
}
|
|
267
|
+
// we need to store the information for multiple documents because a Svelte application could also contain iframes
|
|
268
|
+
// https://github.com/sveltejs/svelte/issues/3624
|
|
269
|
+
var managed_styles = new Map();
|
|
270
|
+
var active = 0;
|
|
271
|
+
// https://github.com/darkskyapp/string-hash/blob/master/index.js
|
|
272
|
+
function hash(str) {
|
|
273
|
+
var hash = 5381;
|
|
274
|
+
var i = str.length;
|
|
275
|
+
while (i--)
|
|
276
|
+
hash = ((hash << 5) - hash) ^ str.charCodeAt(i);
|
|
277
|
+
return hash >>> 0;
|
|
278
|
+
}
|
|
279
|
+
function create_style_information(doc, node) {
|
|
280
|
+
var info = { stylesheet: append_empty_stylesheet(node), rules: {} };
|
|
281
|
+
managed_styles.set(doc, info);
|
|
282
|
+
return info;
|
|
283
|
+
}
|
|
284
|
+
function create_rule(node, a, b, duration, delay, ease, fn, uid) {
|
|
285
|
+
if (uid === void 0) { uid = 0; }
|
|
286
|
+
var step = 16.666 / duration;
|
|
287
|
+
var keyframes = '{\n';
|
|
288
|
+
for (var p = 0; p <= 1; p += step) {
|
|
289
|
+
var t = a + (b - a) * ease(p);
|
|
290
|
+
keyframes += p * 100 + ("%{" + fn(t, 1 - t) + "}\n");
|
|
291
|
+
}
|
|
292
|
+
var rule = keyframes + ("100% {" + fn(b, 1 - b) + "}\n}");
|
|
293
|
+
var name = "__svelte_" + hash(rule) + "_" + uid;
|
|
294
|
+
var doc = get_root_for_style(node);
|
|
295
|
+
var _a = managed_styles.get(doc) || create_style_information(doc, node), stylesheet = _a.stylesheet, rules = _a.rules;
|
|
296
|
+
if (!rules[name]) {
|
|
297
|
+
rules[name] = true;
|
|
298
|
+
stylesheet.insertRule("@keyframes " + name + " " + rule, stylesheet.cssRules.length);
|
|
299
|
+
}
|
|
300
|
+
var animation = node.style.animation || '';
|
|
301
|
+
node.style.animation = "" + (animation ? animation + ", " : '') + name + " " + duration + "ms linear " + delay + "ms 1 both";
|
|
302
|
+
active += 1;
|
|
303
|
+
return name;
|
|
304
|
+
}
|
|
305
|
+
function delete_rule(node, name) {
|
|
306
|
+
var previous = (node.style.animation || '').split(', ');
|
|
307
|
+
var next = previous.filter(name
|
|
308
|
+
? function (anim) { return anim.indexOf(name) < 0; } // remove specific animation
|
|
309
|
+
: function (anim) { return anim.indexOf('__svelte') === -1; } // remove all Svelte animations
|
|
310
|
+
);
|
|
311
|
+
var deleted = previous.length - next.length;
|
|
312
|
+
if (deleted) {
|
|
313
|
+
node.style.animation = next.join(', ');
|
|
314
|
+
active -= deleted;
|
|
315
|
+
if (!active)
|
|
316
|
+
clear_rules();
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
function clear_rules() {
|
|
320
|
+
raf(function () {
|
|
321
|
+
if (active)
|
|
322
|
+
return;
|
|
323
|
+
managed_styles.forEach(function (info) {
|
|
324
|
+
var stylesheet = info.stylesheet;
|
|
325
|
+
var i = stylesheet.cssRules.length;
|
|
326
|
+
while (i--)
|
|
327
|
+
stylesheet.deleteRule(i);
|
|
328
|
+
info.rules = {};
|
|
329
|
+
});
|
|
330
|
+
managed_styles.clear();
|
|
331
|
+
});
|
|
332
|
+
}
|
|
190
333
|
var current_component;
|
|
191
334
|
function set_current_component(component) {
|
|
192
335
|
current_component = component;
|
|
@@ -199,6 +342,9 @@ function get_current_component() {
|
|
|
199
342
|
function onMount(fn) {
|
|
200
343
|
get_current_component().$$.on_mount.push(fn);
|
|
201
344
|
}
|
|
345
|
+
function onDestroy(fn) {
|
|
346
|
+
get_current_component().$$.on_destroy.push(fn);
|
|
347
|
+
}
|
|
202
348
|
var dirty_components = [];
|
|
203
349
|
var binding_callbacks = [];
|
|
204
350
|
var render_callbacks = [];
|
|
@@ -283,6 +429,19 @@ function update($$) {
|
|
|
283
429
|
$$.after_update.forEach(add_render_callback);
|
|
284
430
|
}
|
|
285
431
|
}
|
|
432
|
+
var promise;
|
|
433
|
+
function wait() {
|
|
434
|
+
if (!promise) {
|
|
435
|
+
promise = Promise.resolve();
|
|
436
|
+
promise.then(function () {
|
|
437
|
+
promise = null;
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
return promise;
|
|
441
|
+
}
|
|
442
|
+
function dispatch(node, direction, kind) {
|
|
443
|
+
node.dispatchEvent(custom_event("" + (direction ? 'intro' : 'outro') + kind));
|
|
444
|
+
}
|
|
286
445
|
var outroing = new Set();
|
|
287
446
|
var outros;
|
|
288
447
|
function group_outros() {
|
|
@@ -320,6 +479,112 @@ function transition_out(block, local, detach, callback) {
|
|
|
320
479
|
block.o(local);
|
|
321
480
|
}
|
|
322
481
|
}
|
|
482
|
+
var null_transition = { duration: 0 };
|
|
483
|
+
function create_bidirectional_transition(node, fn, params, intro) {
|
|
484
|
+
var config = fn(node, params);
|
|
485
|
+
var t = intro ? 0 : 1;
|
|
486
|
+
var running_program = null;
|
|
487
|
+
var pending_program = null;
|
|
488
|
+
var animation_name = null;
|
|
489
|
+
function clear_animation() {
|
|
490
|
+
if (animation_name)
|
|
491
|
+
delete_rule(node, animation_name);
|
|
492
|
+
}
|
|
493
|
+
function init(program, duration) {
|
|
494
|
+
var d = (program.b - t);
|
|
495
|
+
duration *= Math.abs(d);
|
|
496
|
+
return {
|
|
497
|
+
a: t,
|
|
498
|
+
b: program.b,
|
|
499
|
+
d: d,
|
|
500
|
+
duration: duration,
|
|
501
|
+
start: program.start,
|
|
502
|
+
end: program.start + duration,
|
|
503
|
+
group: program.group
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
function go(b) {
|
|
507
|
+
var _a = config || null_transition, _b = _a.delay, delay = _b === void 0 ? 0 : _b, _c = _a.duration, duration = _c === void 0 ? 300 : _c, _d = _a.easing, easing = _d === void 0 ? identity : _d, _e = _a.tick, tick = _e === void 0 ? noop : _e, css = _a.css;
|
|
508
|
+
var program = {
|
|
509
|
+
start: now() + delay,
|
|
510
|
+
b: b
|
|
511
|
+
};
|
|
512
|
+
if (!b) {
|
|
513
|
+
// @ts-ignore todo: improve typings
|
|
514
|
+
program.group = outros;
|
|
515
|
+
outros.r += 1;
|
|
516
|
+
}
|
|
517
|
+
if (running_program || pending_program) {
|
|
518
|
+
pending_program = program;
|
|
519
|
+
}
|
|
520
|
+
else {
|
|
521
|
+
// if this is an intro, and there's a delay, we need to do
|
|
522
|
+
// an initial tick and/or apply CSS animation immediately
|
|
523
|
+
if (css) {
|
|
524
|
+
clear_animation();
|
|
525
|
+
animation_name = create_rule(node, t, b, duration, delay, easing, css);
|
|
526
|
+
}
|
|
527
|
+
if (b)
|
|
528
|
+
tick(0, 1);
|
|
529
|
+
running_program = init(program, duration);
|
|
530
|
+
add_render_callback(function () { return dispatch(node, b, 'start'); });
|
|
531
|
+
loop(function (now) {
|
|
532
|
+
if (pending_program && now > pending_program.start) {
|
|
533
|
+
running_program = init(pending_program, duration);
|
|
534
|
+
pending_program = null;
|
|
535
|
+
dispatch(node, running_program.b, 'start');
|
|
536
|
+
if (css) {
|
|
537
|
+
clear_animation();
|
|
538
|
+
animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
if (running_program) {
|
|
542
|
+
if (now >= running_program.end) {
|
|
543
|
+
tick(t = running_program.b, 1 - t);
|
|
544
|
+
dispatch(node, running_program.b, 'end');
|
|
545
|
+
if (!pending_program) {
|
|
546
|
+
// we're done
|
|
547
|
+
if (running_program.b) {
|
|
548
|
+
// intro — we can tidy up immediately
|
|
549
|
+
clear_animation();
|
|
550
|
+
}
|
|
551
|
+
else {
|
|
552
|
+
// outro — needs to be coordinated
|
|
553
|
+
if (!--running_program.group.r)
|
|
554
|
+
run_all(running_program.group.c);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
running_program = null;
|
|
558
|
+
}
|
|
559
|
+
else if (now >= running_program.start) {
|
|
560
|
+
var p = now - running_program.start;
|
|
561
|
+
t = running_program.a + running_program.d * easing(p / running_program.duration);
|
|
562
|
+
tick(t, 1 - t);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
return !!(running_program || pending_program);
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
return {
|
|
570
|
+
run: function (b) {
|
|
571
|
+
if (is_function(config)) {
|
|
572
|
+
wait().then(function () {
|
|
573
|
+
// @ts-ignore
|
|
574
|
+
config = config();
|
|
575
|
+
go(b);
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
else {
|
|
579
|
+
go(b);
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
end: function () {
|
|
583
|
+
clear_animation();
|
|
584
|
+
running_program = pending_program = null;
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
}
|
|
323
588
|
function bind(component, name, callback) {
|
|
324
589
|
var index = component.$$.props[name];
|
|
325
590
|
if (index !== undefined) {
|
|
@@ -338,7 +603,7 @@ function mount_component(component, target, anchor, customElement) {
|
|
|
338
603
|
add_render_callback(function () {
|
|
339
604
|
var new_on_destroy = on_mount.map(run).filter(is_function);
|
|
340
605
|
if (on_destroy) {
|
|
341
|
-
on_destroy.push.apply(on_destroy,
|
|
606
|
+
on_destroy.push.apply(on_destroy, __spread(new_on_destroy));
|
|
342
607
|
}
|
|
343
608
|
else {
|
|
344
609
|
// Edge case - component was destroyed immediately,
|
|
@@ -463,8 +728,78 @@ var SvelteComponent = /** @class */ (function () {
|
|
|
463
728
|
};
|
|
464
729
|
return SvelteComponent;
|
|
465
730
|
}());
|
|
731
|
+
var subscriber_queue = [];
|
|
732
|
+
/**
|
|
733
|
+
* Create a `Writable` store that allows both updating and reading by subscription.
|
|
734
|
+
* @param {*=}value initial value
|
|
735
|
+
* @param {StartStopNotifier=}start start and stop notifications for subscriptions
|
|
736
|
+
*/
|
|
737
|
+
function writable(value, start) {
|
|
738
|
+
if (start === void 0) { start = noop; }
|
|
739
|
+
var stop;
|
|
740
|
+
var subscribers = new Set();
|
|
741
|
+
function set(new_value) {
|
|
742
|
+
var e_1, _a;
|
|
743
|
+
if (safe_not_equal(value, new_value)) {
|
|
744
|
+
value = new_value;
|
|
745
|
+
if (stop) { // store is ready
|
|
746
|
+
var run_queue = !subscriber_queue.length;
|
|
747
|
+
try {
|
|
748
|
+
for (var subscribers_1 = __values(subscribers), subscribers_1_1 = subscribers_1.next(); !subscribers_1_1.done; subscribers_1_1 = subscribers_1.next()) {
|
|
749
|
+
var subscriber = subscribers_1_1.value;
|
|
750
|
+
subscriber[1]();
|
|
751
|
+
subscriber_queue.push(subscriber, value);
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
755
|
+
finally {
|
|
756
|
+
try {
|
|
757
|
+
if (subscribers_1_1 && !subscribers_1_1.done && (_a = subscribers_1.return)) _a.call(subscribers_1);
|
|
758
|
+
}
|
|
759
|
+
finally { if (e_1) throw e_1.error; }
|
|
760
|
+
}
|
|
761
|
+
if (run_queue) {
|
|
762
|
+
for (var i = 0; i < subscriber_queue.length; i += 2) {
|
|
763
|
+
subscriber_queue[i][0](subscriber_queue[i + 1]);
|
|
764
|
+
}
|
|
765
|
+
subscriber_queue.length = 0;
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
function update(fn) {
|
|
771
|
+
set(fn(value));
|
|
772
|
+
}
|
|
773
|
+
function subscribe(run, invalidate) {
|
|
774
|
+
if (invalidate === void 0) { invalidate = noop; }
|
|
775
|
+
var subscriber = [run, invalidate];
|
|
776
|
+
subscribers.add(subscriber);
|
|
777
|
+
if (subscribers.size === 1) {
|
|
778
|
+
stop = start(set) || noop;
|
|
779
|
+
}
|
|
780
|
+
run(value);
|
|
781
|
+
return function () {
|
|
782
|
+
subscribers.delete(subscriber);
|
|
783
|
+
if (subscribers.size === 0) {
|
|
784
|
+
stop();
|
|
785
|
+
stop = null;
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
return { set: set, update: update, subscribe: subscribe };
|
|
790
|
+
}
|
|
791
|
+
var AppStore = writable({
|
|
792
|
+
initialValue: true,
|
|
793
|
+
customFields: [],
|
|
794
|
+
branding: {
|
|
795
|
+
logo: "",
|
|
796
|
+
colors: {
|
|
797
|
+
lightMode: {},
|
|
798
|
+
}
|
|
799
|
+
},
|
|
800
|
+
});
|
|
466
801
|
/* src/icons/LoadingIcon.svelte generated by Svelte v3.48.0 */
|
|
467
|
-
function create_fragment$
|
|
802
|
+
function create_fragment$v(ctx) {
|
|
468
803
|
var svg;
|
|
469
804
|
var path;
|
|
470
805
|
var animateTransform;
|
|
@@ -509,13 +844,13 @@ var LoadingIcon = /** @class */ (function (_super) {
|
|
|
509
844
|
__extends(LoadingIcon, _super);
|
|
510
845
|
function LoadingIcon(options) {
|
|
511
846
|
var _this = _super.call(this) || this;
|
|
512
|
-
init(_this, options, null, create_fragment$
|
|
847
|
+
init(_this, options, null, create_fragment$v, safe_not_equal, {});
|
|
513
848
|
return _this;
|
|
514
849
|
}
|
|
515
850
|
return LoadingIcon;
|
|
516
851
|
}(SvelteComponent));
|
|
517
852
|
/* src/components/Loader.svelte generated by Svelte v3.48.0 */
|
|
518
|
-
function create_fragment$
|
|
853
|
+
function create_fragment$u(ctx) {
|
|
519
854
|
var div;
|
|
520
855
|
var loadingicon;
|
|
521
856
|
var current;
|
|
@@ -553,13 +888,13 @@ var Loader = /** @class */ (function (_super) {
|
|
|
553
888
|
__extends(Loader, _super);
|
|
554
889
|
function Loader(options) {
|
|
555
890
|
var _this = _super.call(this) || this;
|
|
556
|
-
init(_this, options, null, create_fragment$
|
|
891
|
+
init(_this, options, null, create_fragment$u, safe_not_equal, {});
|
|
557
892
|
return _this;
|
|
558
893
|
}
|
|
559
894
|
return Loader;
|
|
560
895
|
}(SvelteComponent));
|
|
561
896
|
/* src/icons/CloseIcon.svelte generated by Svelte v3.48.0 */
|
|
562
|
-
function create_fragment$
|
|
897
|
+
function create_fragment$t(ctx) {
|
|
563
898
|
var svg;
|
|
564
899
|
var path;
|
|
565
900
|
return {
|
|
@@ -591,13 +926,13 @@ var CloseIcon = /** @class */ (function (_super) {
|
|
|
591
926
|
__extends(CloseIcon, _super);
|
|
592
927
|
function CloseIcon(options) {
|
|
593
928
|
var _this = _super.call(this) || this;
|
|
594
|
-
init(_this, options, null, create_fragment$
|
|
929
|
+
init(_this, options, null, create_fragment$t, safe_not_equal, {});
|
|
595
930
|
return _this;
|
|
596
931
|
}
|
|
597
932
|
return CloseIcon;
|
|
598
933
|
}(SvelteComponent));
|
|
599
934
|
/* src/components/CloseButton.svelte generated by Svelte v3.48.0 */
|
|
600
|
-
function create_fragment$
|
|
935
|
+
function create_fragment$s(ctx) {
|
|
601
936
|
var div;
|
|
602
937
|
var button;
|
|
603
938
|
var closeicon;
|
|
@@ -648,7 +983,7 @@ function create_fragment$q(ctx) {
|
|
|
648
983
|
}
|
|
649
984
|
};
|
|
650
985
|
}
|
|
651
|
-
function instance$
|
|
986
|
+
function instance$f($$self, $$props, $$invalidate) {
|
|
652
987
|
var closeModal = $$props.closeModal;
|
|
653
988
|
$$self.$$set = function ($$props) {
|
|
654
989
|
if ('closeModal' in $$props)
|
|
@@ -660,13 +995,13 @@ var CloseButton = /** @class */ (function (_super) {
|
|
|
660
995
|
__extends(CloseButton, _super);
|
|
661
996
|
function CloseButton(options) {
|
|
662
997
|
var _this = _super.call(this) || this;
|
|
663
|
-
init(_this, options, instance$
|
|
998
|
+
init(_this, options, instance$f, create_fragment$s, safe_not_equal, { closeModal: 0 });
|
|
664
999
|
return _this;
|
|
665
1000
|
}
|
|
666
1001
|
return CloseButton;
|
|
667
1002
|
}(SvelteComponent));
|
|
668
1003
|
/* src/icons/MemberstackIcon.svelte generated by Svelte v3.48.0 */
|
|
669
|
-
function create_fragment$
|
|
1004
|
+
function create_fragment$r(ctx) {
|
|
670
1005
|
var svg;
|
|
671
1006
|
var path0;
|
|
672
1007
|
var path1;
|
|
@@ -720,26 +1055,22 @@ var MemberstackIcon = /** @class */ (function (_super) {
|
|
|
720
1055
|
__extends(MemberstackIcon, _super);
|
|
721
1056
|
function MemberstackIcon(options) {
|
|
722
1057
|
var _this = _super.call(this) || this;
|
|
723
|
-
init(_this, options, null, create_fragment$
|
|
1058
|
+
init(_this, options, null, create_fragment$r, safe_not_equal, {});
|
|
724
1059
|
return _this;
|
|
725
1060
|
}
|
|
726
1061
|
return MemberstackIcon;
|
|
727
1062
|
}(SvelteComponent));
|
|
728
1063
|
/* src/components/FigureElement.svelte generated by Svelte v3.48.0 */
|
|
729
|
-
function
|
|
730
|
-
var figure;
|
|
1064
|
+
function create_else_block$3(ctx) {
|
|
731
1065
|
var memberstackicon;
|
|
732
1066
|
var current;
|
|
733
1067
|
memberstackicon = new MemberstackIcon({});
|
|
734
1068
|
return {
|
|
735
1069
|
c: function () {
|
|
736
|
-
figure = element("figure");
|
|
737
1070
|
create_component(memberstackicon.$$.fragment);
|
|
738
|
-
attr(figure, "class", "ms-modal__figure");
|
|
739
1071
|
},
|
|
740
1072
|
m: function (target, anchor) {
|
|
741
|
-
|
|
742
|
-
mount_component(memberstackicon, figure, null);
|
|
1073
|
+
mount_component(memberstackicon, target, anchor);
|
|
743
1074
|
current = true;
|
|
744
1075
|
},
|
|
745
1076
|
p: noop,
|
|
@@ -753,24 +1084,128 @@ function create_fragment$o(ctx) {
|
|
|
753
1084
|
transition_out(memberstackicon.$$.fragment, local);
|
|
754
1085
|
current = false;
|
|
755
1086
|
},
|
|
1087
|
+
d: function (detaching) {
|
|
1088
|
+
destroy_component(memberstackicon, detaching);
|
|
1089
|
+
}
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
// (13:2) {#if app.branding.logo}
|
|
1093
|
+
function create_if_block$a(ctx) {
|
|
1094
|
+
var img;
|
|
1095
|
+
var img_src_value;
|
|
1096
|
+
var img_alt_value;
|
|
1097
|
+
return {
|
|
1098
|
+
c: function () {
|
|
1099
|
+
img = element("img");
|
|
1100
|
+
if (!src_url_equal(img.src, img_src_value = /*app*/ ctx[0].branding.logo))
|
|
1101
|
+
attr(img, "src", img_src_value);
|
|
1102
|
+
attr(img, "alt", img_alt_value = /*app*/ ctx[0].name);
|
|
1103
|
+
attr(img, "data-cy", "logo");
|
|
1104
|
+
},
|
|
1105
|
+
m: function (target, anchor) {
|
|
1106
|
+
insert(target, img, anchor);
|
|
1107
|
+
},
|
|
1108
|
+
p: function (ctx, dirty) {
|
|
1109
|
+
if (dirty & /*app*/ 1 && !src_url_equal(img.src, img_src_value = /*app*/ ctx[0].branding.logo)) {
|
|
1110
|
+
attr(img, "src", img_src_value);
|
|
1111
|
+
}
|
|
1112
|
+
if (dirty & /*app*/ 1 && img_alt_value !== (img_alt_value = /*app*/ ctx[0].name)) {
|
|
1113
|
+
attr(img, "alt", img_alt_value);
|
|
1114
|
+
}
|
|
1115
|
+
},
|
|
1116
|
+
i: noop,
|
|
1117
|
+
o: noop,
|
|
1118
|
+
d: function (detaching) {
|
|
1119
|
+
if (detaching)
|
|
1120
|
+
detach(img);
|
|
1121
|
+
}
|
|
1122
|
+
};
|
|
1123
|
+
}
|
|
1124
|
+
function create_fragment$q(ctx) {
|
|
1125
|
+
var figure;
|
|
1126
|
+
var current_block_type_index;
|
|
1127
|
+
var if_block;
|
|
1128
|
+
var current;
|
|
1129
|
+
var if_block_creators = [create_if_block$a, create_else_block$3];
|
|
1130
|
+
var if_blocks = [];
|
|
1131
|
+
function select_block_type(ctx, dirty) {
|
|
1132
|
+
if ( /*app*/ctx[0].branding.logo)
|
|
1133
|
+
return 0;
|
|
1134
|
+
return 1;
|
|
1135
|
+
}
|
|
1136
|
+
current_block_type_index = select_block_type(ctx);
|
|
1137
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
1138
|
+
return {
|
|
1139
|
+
c: function () {
|
|
1140
|
+
figure = element("figure");
|
|
1141
|
+
if_block.c();
|
|
1142
|
+
attr(figure, "class", "ms-modal__figure");
|
|
1143
|
+
},
|
|
1144
|
+
m: function (target, anchor) {
|
|
1145
|
+
insert(target, figure, anchor);
|
|
1146
|
+
if_blocks[current_block_type_index].m(figure, null);
|
|
1147
|
+
current = true;
|
|
1148
|
+
},
|
|
1149
|
+
p: function (ctx, _a) {
|
|
1150
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
1151
|
+
var previous_block_index = current_block_type_index;
|
|
1152
|
+
current_block_type_index = select_block_type(ctx);
|
|
1153
|
+
if (current_block_type_index === previous_block_index) {
|
|
1154
|
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
|
1155
|
+
}
|
|
1156
|
+
else {
|
|
1157
|
+
group_outros();
|
|
1158
|
+
transition_out(if_blocks[previous_block_index], 1, 1, function () {
|
|
1159
|
+
if_blocks[previous_block_index] = null;
|
|
1160
|
+
});
|
|
1161
|
+
check_outros();
|
|
1162
|
+
if_block = if_blocks[current_block_type_index];
|
|
1163
|
+
if (!if_block) {
|
|
1164
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
1165
|
+
if_block.c();
|
|
1166
|
+
}
|
|
1167
|
+
else {
|
|
1168
|
+
if_block.p(ctx, dirty);
|
|
1169
|
+
}
|
|
1170
|
+
transition_in(if_block, 1);
|
|
1171
|
+
if_block.m(figure, null);
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
i: function (local) {
|
|
1175
|
+
if (current)
|
|
1176
|
+
return;
|
|
1177
|
+
transition_in(if_block);
|
|
1178
|
+
current = true;
|
|
1179
|
+
},
|
|
1180
|
+
o: function (local) {
|
|
1181
|
+
transition_out(if_block);
|
|
1182
|
+
current = false;
|
|
1183
|
+
},
|
|
756
1184
|
d: function (detaching) {
|
|
757
1185
|
if (detaching)
|
|
758
1186
|
detach(figure);
|
|
759
|
-
|
|
1187
|
+
if_blocks[current_block_type_index].d();
|
|
760
1188
|
}
|
|
761
1189
|
};
|
|
762
1190
|
}
|
|
1191
|
+
function instance$e($$self, $$props, $$invalidate) {
|
|
1192
|
+
var app = {};
|
|
1193
|
+
AppStore.subscribe(function (data) {
|
|
1194
|
+
$$invalidate(0, app = data);
|
|
1195
|
+
});
|
|
1196
|
+
return [app];
|
|
1197
|
+
}
|
|
763
1198
|
var FigureElement = /** @class */ (function (_super) {
|
|
764
1199
|
__extends(FigureElement, _super);
|
|
765
1200
|
function FigureElement(options) {
|
|
766
1201
|
var _this = _super.call(this) || this;
|
|
767
|
-
init(_this, options,
|
|
1202
|
+
init(_this, options, instance$e, create_fragment$q, safe_not_equal, {});
|
|
768
1203
|
return _this;
|
|
769
1204
|
}
|
|
770
1205
|
return FigureElement;
|
|
771
1206
|
}(SvelteComponent));
|
|
772
1207
|
/* src/components/SubmitButton.svelte generated by Svelte v3.48.0 */
|
|
773
|
-
function create_else_block$
|
|
1208
|
+
function create_else_block$2(ctx) {
|
|
774
1209
|
var button;
|
|
775
1210
|
var loadingicon;
|
|
776
1211
|
var current;
|
|
@@ -780,7 +1215,8 @@ function create_else_block$1(ctx) {
|
|
|
780
1215
|
button = element("button");
|
|
781
1216
|
create_component(loadingicon.$$.fragment);
|
|
782
1217
|
attr(button, "class", "ms-form__button");
|
|
783
|
-
attr(button, "type", "
|
|
1218
|
+
attr(button, "type", "button");
|
|
1219
|
+
set_style(button, "background-color", /*buttonColor*/ ctx[2]);
|
|
784
1220
|
button.disabled = true;
|
|
785
1221
|
},
|
|
786
1222
|
m: function (target, anchor) {
|
|
@@ -788,7 +1224,11 @@ function create_else_block$1(ctx) {
|
|
|
788
1224
|
mount_component(loadingicon, button, null);
|
|
789
1225
|
current = true;
|
|
790
1226
|
},
|
|
791
|
-
p:
|
|
1227
|
+
p: function (ctx, dirty) {
|
|
1228
|
+
if (!current || dirty & /*buttonColor*/ 4) {
|
|
1229
|
+
set_style(button, "background-color", /*buttonColor*/ ctx[2]);
|
|
1230
|
+
}
|
|
1231
|
+
},
|
|
792
1232
|
i: function (local) {
|
|
793
1233
|
if (current)
|
|
794
1234
|
return;
|
|
@@ -806,8 +1246,8 @@ function create_else_block$1(ctx) {
|
|
|
806
1246
|
}
|
|
807
1247
|
};
|
|
808
1248
|
}
|
|
809
|
-
// (
|
|
810
|
-
function create_if_block$
|
|
1249
|
+
// (15:2) {#if !isLoading}
|
|
1250
|
+
function create_if_block$9(ctx) {
|
|
811
1251
|
var button;
|
|
812
1252
|
var t;
|
|
813
1253
|
return {
|
|
@@ -816,6 +1256,7 @@ function create_if_block$6(ctx) {
|
|
|
816
1256
|
t = text(/*buttonText*/ ctx[0]);
|
|
817
1257
|
attr(button, "class", "ms-form__button");
|
|
818
1258
|
attr(button, "type", "submit");
|
|
1259
|
+
set_style(button, "background-color", /*buttonColor*/ ctx[2]);
|
|
819
1260
|
},
|
|
820
1261
|
m: function (target, anchor) {
|
|
821
1262
|
insert(target, button, anchor);
|
|
@@ -824,6 +1265,9 @@ function create_if_block$6(ctx) {
|
|
|
824
1265
|
p: function (ctx, dirty) {
|
|
825
1266
|
if (dirty & /*buttonText*/ 1)
|
|
826
1267
|
set_data(t, /*buttonText*/ ctx[0]);
|
|
1268
|
+
if (dirty & /*buttonColor*/ 4) {
|
|
1269
|
+
set_style(button, "background-color", /*buttonColor*/ ctx[2]);
|
|
1270
|
+
}
|
|
827
1271
|
},
|
|
828
1272
|
i: noop,
|
|
829
1273
|
o: noop,
|
|
@@ -833,12 +1277,12 @@ function create_if_block$6(ctx) {
|
|
|
833
1277
|
}
|
|
834
1278
|
};
|
|
835
1279
|
}
|
|
836
|
-
function create_fragment$
|
|
1280
|
+
function create_fragment$p(ctx) {
|
|
837
1281
|
var div;
|
|
838
1282
|
var current_block_type_index;
|
|
839
1283
|
var if_block;
|
|
840
1284
|
var current;
|
|
841
|
-
var if_block_creators = [create_if_block$
|
|
1285
|
+
var if_block_creators = [create_if_block$9, create_else_block$2];
|
|
842
1286
|
var if_blocks = [];
|
|
843
1287
|
function select_block_type(ctx, dirty) {
|
|
844
1288
|
if (!ctx[1])
|
|
@@ -899,28 +1343,34 @@ function create_fragment$n(ctx) {
|
|
|
899
1343
|
}
|
|
900
1344
|
};
|
|
901
1345
|
}
|
|
902
|
-
function instance$
|
|
1346
|
+
function instance$d($$self, $$props, $$invalidate) {
|
|
1347
|
+
var $app;
|
|
1348
|
+
component_subscribe($$self, AppStore, function ($$value) { return $$invalidate(3, $app = $$value); });
|
|
903
1349
|
var _a = $$props.buttonText, buttonText = _a === void 0 ? "Submit" : _a;
|
|
904
1350
|
var _b = $$props.isLoading, isLoading = _b === void 0 ? false : _b;
|
|
1351
|
+
var buttonColor = "rgb(41, 98, 255)";
|
|
1352
|
+
if ($app.branding.colors.lightMode.primaryButton) {
|
|
1353
|
+
buttonColor = $app.branding.colors.lightMode.primaryButton;
|
|
1354
|
+
}
|
|
905
1355
|
$$self.$$set = function ($$props) {
|
|
906
1356
|
if ('buttonText' in $$props)
|
|
907
1357
|
$$invalidate(0, buttonText = $$props.buttonText);
|
|
908
1358
|
if ('isLoading' in $$props)
|
|
909
1359
|
$$invalidate(1, isLoading = $$props.isLoading);
|
|
910
1360
|
};
|
|
911
|
-
return [buttonText, isLoading];
|
|
1361
|
+
return [buttonText, isLoading, buttonColor];
|
|
912
1362
|
}
|
|
913
1363
|
var SubmitButton = /** @class */ (function (_super) {
|
|
914
1364
|
__extends(SubmitButton, _super);
|
|
915
1365
|
function SubmitButton(options) {
|
|
916
1366
|
var _this = _super.call(this) || this;
|
|
917
|
-
init(_this, options, instance$
|
|
1367
|
+
init(_this, options, instance$d, create_fragment$p, safe_not_equal, { buttonText: 0, isLoading: 1 });
|
|
918
1368
|
return _this;
|
|
919
1369
|
}
|
|
920
1370
|
return SubmitButton;
|
|
921
1371
|
}(SvelteComponent));
|
|
922
1372
|
/* src/icons/ErrorIcon.svelte generated by Svelte v3.48.0 */
|
|
923
|
-
function create_fragment$
|
|
1373
|
+
function create_fragment$o(ctx) {
|
|
924
1374
|
var svg;
|
|
925
1375
|
var path;
|
|
926
1376
|
return {
|
|
@@ -950,13 +1400,13 @@ var ErrorIcon = /** @class */ (function (_super) {
|
|
|
950
1400
|
__extends(ErrorIcon, _super);
|
|
951
1401
|
function ErrorIcon(options) {
|
|
952
1402
|
var _this = _super.call(this) || this;
|
|
953
|
-
init(_this, options, null, create_fragment$
|
|
1403
|
+
init(_this, options, null, create_fragment$o, safe_not_equal, {});
|
|
954
1404
|
return _this;
|
|
955
1405
|
}
|
|
956
1406
|
return ErrorIcon;
|
|
957
1407
|
}(SvelteComponent));
|
|
958
1408
|
/* src/components/EmailInput.svelte generated by Svelte v3.48.0 */
|
|
959
|
-
function create_if_block$
|
|
1409
|
+
function create_if_block$8(ctx) {
|
|
960
1410
|
var div;
|
|
961
1411
|
var erroricon;
|
|
962
1412
|
var t0;
|
|
@@ -996,7 +1446,7 @@ function create_if_block$5(ctx) {
|
|
|
996
1446
|
}
|
|
997
1447
|
};
|
|
998
1448
|
}
|
|
999
|
-
function create_fragment$
|
|
1449
|
+
function create_fragment$n(ctx) {
|
|
1000
1450
|
var div;
|
|
1001
1451
|
var label;
|
|
1002
1452
|
var t1;
|
|
@@ -1005,12 +1455,12 @@ function create_fragment$l(ctx) {
|
|
|
1005
1455
|
var current;
|
|
1006
1456
|
var mounted;
|
|
1007
1457
|
var dispose;
|
|
1008
|
-
var if_block = /*inputError*/ ctx[
|
|
1458
|
+
var if_block = /*inputError*/ ctx[1] && create_if_block$8();
|
|
1009
1459
|
return {
|
|
1010
1460
|
c: function () {
|
|
1011
1461
|
div = element("div");
|
|
1012
1462
|
label = element("label");
|
|
1013
|
-
label.textContent = ""
|
|
1463
|
+
label.textContent = "" + emailLabel;
|
|
1014
1464
|
t1 = space();
|
|
1015
1465
|
input = element("input");
|
|
1016
1466
|
t2 = space();
|
|
@@ -1030,26 +1480,33 @@ function create_fragment$l(ctx) {
|
|
|
1030
1480
|
append(div, label);
|
|
1031
1481
|
append(div, t1);
|
|
1032
1482
|
append(div, input);
|
|
1483
|
+
set_input_value(input, /*emailValue*/ ctx[0]);
|
|
1033
1484
|
append(div, t2);
|
|
1034
1485
|
if (if_block)
|
|
1035
1486
|
if_block.m(div, null);
|
|
1036
1487
|
current = true;
|
|
1037
1488
|
if (!mounted) {
|
|
1038
|
-
dispose =
|
|
1489
|
+
dispose = [
|
|
1490
|
+
listen(input, "blur", /*validateField*/ ctx[2]),
|
|
1491
|
+
listen(input, "input", /*input_input_handler*/ ctx[4])
|
|
1492
|
+
];
|
|
1039
1493
|
mounted = true;
|
|
1040
1494
|
}
|
|
1041
1495
|
},
|
|
1042
1496
|
p: function (ctx, _a) {
|
|
1043
1497
|
var _b = __read(_a, 1), dirty = _b[0];
|
|
1044
|
-
if ( /*
|
|
1498
|
+
if (dirty & /*emailValue*/ 1 && input.value !== /*emailValue*/ ctx[0]) {
|
|
1499
|
+
set_input_value(input, /*emailValue*/ ctx[0]);
|
|
1500
|
+
}
|
|
1501
|
+
if ( /*inputError*/ctx[1]) {
|
|
1045
1502
|
if (if_block) {
|
|
1046
1503
|
if_block.p(ctx, dirty);
|
|
1047
|
-
if (dirty & /*inputError*/
|
|
1504
|
+
if (dirty & /*inputError*/ 2) {
|
|
1048
1505
|
transition_in(if_block, 1);
|
|
1049
1506
|
}
|
|
1050
1507
|
}
|
|
1051
1508
|
else {
|
|
1052
|
-
if_block = create_if_block$
|
|
1509
|
+
if_block = create_if_block$8();
|
|
1053
1510
|
if_block.c();
|
|
1054
1511
|
transition_in(if_block, 1);
|
|
1055
1512
|
if_block.m(div, null);
|
|
@@ -1079,46 +1536,51 @@ function create_fragment$l(ctx) {
|
|
|
1079
1536
|
if (if_block)
|
|
1080
1537
|
if_block.d();
|
|
1081
1538
|
mounted = false;
|
|
1082
|
-
dispose
|
|
1539
|
+
run_all(dispose);
|
|
1083
1540
|
}
|
|
1084
1541
|
};
|
|
1085
1542
|
}
|
|
1086
1543
|
var emailLabel = "Email Address";
|
|
1087
1544
|
var errorMessage$1 = "Please enter a valid email address";
|
|
1088
|
-
function instance$
|
|
1545
|
+
function instance$c($$self, $$props, $$invalidate) {
|
|
1089
1546
|
var _a = $$props.emailInputValid, emailInputValid = _a === void 0 ? false : _a;
|
|
1547
|
+
var emailValue = $$props.emailValue;
|
|
1090
1548
|
var inputError = false;
|
|
1091
1549
|
var validateField = function (e) {
|
|
1092
1550
|
var emailInput = e.target;
|
|
1093
|
-
var hasValidEmail = (
|
|
1094
|
-
? true
|
|
1095
|
-
: false;
|
|
1551
|
+
var hasValidEmail = (/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/).test(emailInput.value);
|
|
1096
1552
|
if (!hasValidEmail && e.target.value.length > 0) {
|
|
1097
|
-
$$invalidate(
|
|
1098
|
-
$$invalidate(
|
|
1553
|
+
$$invalidate(3, emailInputValid = false);
|
|
1554
|
+
$$invalidate(1, inputError = true);
|
|
1099
1555
|
}
|
|
1100
1556
|
else {
|
|
1101
|
-
$$invalidate(
|
|
1102
|
-
$$invalidate(
|
|
1557
|
+
$$invalidate(3, emailInputValid = true);
|
|
1558
|
+
$$invalidate(1, inputError = false);
|
|
1103
1559
|
}
|
|
1104
1560
|
};
|
|
1561
|
+
function input_input_handler() {
|
|
1562
|
+
emailValue = this.value;
|
|
1563
|
+
$$invalidate(0, emailValue);
|
|
1564
|
+
}
|
|
1105
1565
|
$$self.$$set = function ($$props) {
|
|
1106
1566
|
if ('emailInputValid' in $$props)
|
|
1107
|
-
$$invalidate(
|
|
1567
|
+
$$invalidate(3, emailInputValid = $$props.emailInputValid);
|
|
1568
|
+
if ('emailValue' in $$props)
|
|
1569
|
+
$$invalidate(0, emailValue = $$props.emailValue);
|
|
1108
1570
|
};
|
|
1109
|
-
return [inputError, validateField, emailInputValid];
|
|
1571
|
+
return [emailValue, inputError, validateField, emailInputValid, input_input_handler];
|
|
1110
1572
|
}
|
|
1111
1573
|
var EmailInput = /** @class */ (function (_super) {
|
|
1112
1574
|
__extends(EmailInput, _super);
|
|
1113
1575
|
function EmailInput(options) {
|
|
1114
1576
|
var _this = _super.call(this) || this;
|
|
1115
|
-
init(_this, options, instance$
|
|
1577
|
+
init(_this, options, instance$c, create_fragment$n, safe_not_equal, { emailInputValid: 3, emailValue: 0 });
|
|
1116
1578
|
return _this;
|
|
1117
1579
|
}
|
|
1118
1580
|
return EmailInput;
|
|
1119
1581
|
}(SvelteComponent));
|
|
1120
1582
|
/* src/icons/EyeIcon.svelte generated by Svelte v3.48.0 */
|
|
1121
|
-
function create_fragment$
|
|
1583
|
+
function create_fragment$m(ctx) {
|
|
1122
1584
|
var svg;
|
|
1123
1585
|
var path;
|
|
1124
1586
|
return {
|
|
@@ -1149,13 +1611,13 @@ var EyeIcon = /** @class */ (function (_super) {
|
|
|
1149
1611
|
__extends(EyeIcon, _super);
|
|
1150
1612
|
function EyeIcon(options) {
|
|
1151
1613
|
var _this = _super.call(this) || this;
|
|
1152
|
-
init(_this, options, null, create_fragment$
|
|
1614
|
+
init(_this, options, null, create_fragment$m, safe_not_equal, {});
|
|
1153
1615
|
return _this;
|
|
1154
1616
|
}
|
|
1155
1617
|
return EyeIcon;
|
|
1156
1618
|
}(SvelteComponent));
|
|
1157
1619
|
/* src/icons/EyeSlashIcon.svelte generated by Svelte v3.48.0 */
|
|
1158
|
-
function create_fragment$
|
|
1620
|
+
function create_fragment$l(ctx) {
|
|
1159
1621
|
var svg;
|
|
1160
1622
|
var path;
|
|
1161
1623
|
return {
|
|
@@ -1186,7 +1648,7 @@ var EyeSlashIcon = /** @class */ (function (_super) {
|
|
|
1186
1648
|
__extends(EyeSlashIcon, _super);
|
|
1187
1649
|
function EyeSlashIcon(options) {
|
|
1188
1650
|
var _this = _super.call(this) || this;
|
|
1189
|
-
init(_this, options, null, create_fragment$
|
|
1651
|
+
init(_this, options, null, create_fragment$l, safe_not_equal, {});
|
|
1190
1652
|
return _this;
|
|
1191
1653
|
}
|
|
1192
1654
|
return EyeSlashIcon;
|
|
@@ -1205,13 +1667,14 @@ function create_if_block_2$2(ctx) {
|
|
|
1205
1667
|
attr(button, "data-cy", "forgot-password-btn");
|
|
1206
1668
|
attr(button, "class", "ms-form__button ms-form__button--text");
|
|
1207
1669
|
attr(button, "tabindex", "-1");
|
|
1670
|
+
attr(button, "type", "button");
|
|
1208
1671
|
attr(div, "class", "ms-form__label ms-form__label--right");
|
|
1209
1672
|
},
|
|
1210
1673
|
m: function (target, anchor) {
|
|
1211
1674
|
insert(target, div, anchor);
|
|
1212
1675
|
append(div, button);
|
|
1213
1676
|
if (!mounted) {
|
|
1214
|
-
dispose = listen(button, "click", /*click_handler*/ ctx[
|
|
1677
|
+
dispose = listen(button, "click", /*click_handler*/ ctx[12]);
|
|
1215
1678
|
mounted = true;
|
|
1216
1679
|
}
|
|
1217
1680
|
},
|
|
@@ -1224,8 +1687,8 @@ function create_if_block_2$2(ctx) {
|
|
|
1224
1687
|
}
|
|
1225
1688
|
};
|
|
1226
1689
|
}
|
|
1227
|
-
// (
|
|
1228
|
-
function create_else_block(ctx) {
|
|
1690
|
+
// (57:6) {:else}
|
|
1691
|
+
function create_else_block$1(ctx) {
|
|
1229
1692
|
var eyeslashicon;
|
|
1230
1693
|
var current;
|
|
1231
1694
|
eyeslashicon = new EyeSlashIcon({});
|
|
@@ -1252,8 +1715,8 @@ function create_else_block(ctx) {
|
|
|
1252
1715
|
}
|
|
1253
1716
|
};
|
|
1254
1717
|
}
|
|
1255
|
-
// (
|
|
1256
|
-
function create_if_block_1$
|
|
1718
|
+
// (55:6) {#if !passwordVisible}
|
|
1719
|
+
function create_if_block_1$3(ctx) {
|
|
1257
1720
|
var eyeicon;
|
|
1258
1721
|
var current;
|
|
1259
1722
|
eyeicon = new EyeIcon({});
|
|
@@ -1280,8 +1743,8 @@ function create_if_block_1$2(ctx) {
|
|
|
1280
1743
|
}
|
|
1281
1744
|
};
|
|
1282
1745
|
}
|
|
1283
|
-
// (
|
|
1284
|
-
function create_if_block$
|
|
1746
|
+
// (62:2) {#if inputError}
|
|
1747
|
+
function create_if_block$7(ctx) {
|
|
1285
1748
|
var div;
|
|
1286
1749
|
var erroricon;
|
|
1287
1750
|
var t0;
|
|
@@ -1321,7 +1784,7 @@ function create_if_block$4(ctx) {
|
|
|
1321
1784
|
}
|
|
1322
1785
|
};
|
|
1323
1786
|
}
|
|
1324
|
-
function create_fragment$
|
|
1787
|
+
function create_fragment$k(ctx) {
|
|
1325
1788
|
var div3;
|
|
1326
1789
|
var div0;
|
|
1327
1790
|
var label;
|
|
@@ -1330,6 +1793,7 @@ function create_fragment$i(ctx) {
|
|
|
1330
1793
|
var t2;
|
|
1331
1794
|
var div2;
|
|
1332
1795
|
var input;
|
|
1796
|
+
var input_value_value;
|
|
1333
1797
|
var t3;
|
|
1334
1798
|
var div1;
|
|
1335
1799
|
var current_block_type_index;
|
|
@@ -1338,23 +1802,23 @@ function create_fragment$i(ctx) {
|
|
|
1338
1802
|
var current;
|
|
1339
1803
|
var mounted;
|
|
1340
1804
|
var dispose;
|
|
1341
|
-
var if_block0 = /*showForgotPasswordLabel*/ ctx[
|
|
1342
|
-
var if_block_creators = [create_if_block_1$
|
|
1805
|
+
var if_block0 = /*showForgotPasswordLabel*/ ctx[2] && create_if_block_2$2(ctx);
|
|
1806
|
+
var if_block_creators = [create_if_block_1$3, create_else_block$1];
|
|
1343
1807
|
var if_blocks = [];
|
|
1344
1808
|
function select_block_type(ctx, dirty) {
|
|
1345
|
-
if (!ctx[
|
|
1809
|
+
if (!ctx[5])
|
|
1346
1810
|
return 0;
|
|
1347
1811
|
return 1;
|
|
1348
1812
|
}
|
|
1349
1813
|
current_block_type_index = select_block_type(ctx);
|
|
1350
1814
|
if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
1351
|
-
var if_block2 = /*inputError*/ ctx[
|
|
1815
|
+
var if_block2 = /*inputError*/ ctx[6] && create_if_block$7();
|
|
1352
1816
|
return {
|
|
1353
1817
|
c: function () {
|
|
1354
1818
|
div3 = element("div");
|
|
1355
1819
|
div0 = element("div");
|
|
1356
1820
|
label = element("label");
|
|
1357
|
-
t0 = text(/*passwordLabel*/ ctx[
|
|
1821
|
+
t0 = text(/*passwordLabel*/ ctx[3]);
|
|
1358
1822
|
t1 = space();
|
|
1359
1823
|
if (if_block0)
|
|
1360
1824
|
if_block0.c();
|
|
@@ -1371,8 +1835,9 @@ function create_fragment$i(ctx) {
|
|
|
1371
1835
|
attr(label, "for", "psw");
|
|
1372
1836
|
attr(div0, "class", "ms-form__flex");
|
|
1373
1837
|
attr(input, "class", "ms-form__input ms-form__input--password");
|
|
1374
|
-
attr(input, "type", /*type*/ ctx[
|
|
1375
|
-
attr(input, "placeholder", /*passwordPlaceholder*/ ctx[
|
|
1838
|
+
attr(input, "type", /*type*/ ctx[7]);
|
|
1839
|
+
attr(input, "placeholder", /*passwordPlaceholder*/ ctx[4]);
|
|
1840
|
+
input.value = input_value_value = /*passwordValue*/ ctx[0] || "";
|
|
1376
1841
|
attr(input, "name", "psw");
|
|
1377
1842
|
attr(input, "autocomplete", "off");
|
|
1378
1843
|
input.required = true;
|
|
@@ -1401,17 +1866,18 @@ function create_fragment$i(ctx) {
|
|
|
1401
1866
|
current = true;
|
|
1402
1867
|
if (!mounted) {
|
|
1403
1868
|
dispose = [
|
|
1404
|
-
listen(input, "
|
|
1405
|
-
listen(
|
|
1869
|
+
listen(input, "input", /*handleInput*/ ctx[9]),
|
|
1870
|
+
listen(input, "blur", /*validateField*/ ctx[10]),
|
|
1871
|
+
listen(div1, "click", /*togglePassword*/ ctx[8])
|
|
1406
1872
|
];
|
|
1407
1873
|
mounted = true;
|
|
1408
1874
|
}
|
|
1409
1875
|
},
|
|
1410
1876
|
p: function (ctx, _a) {
|
|
1411
1877
|
var _b = __read(_a, 1), dirty = _b[0];
|
|
1412
|
-
if (!current || dirty & /*passwordLabel*/
|
|
1413
|
-
set_data(t0, /*passwordLabel*/ ctx[
|
|
1414
|
-
if ( /*showForgotPasswordLabel*/ctx[
|
|
1878
|
+
if (!current || dirty & /*passwordLabel*/ 8)
|
|
1879
|
+
set_data(t0, /*passwordLabel*/ ctx[3]);
|
|
1880
|
+
if ( /*showForgotPasswordLabel*/ctx[2]) {
|
|
1415
1881
|
if (if_block0) {
|
|
1416
1882
|
if_block0.p(ctx, dirty);
|
|
1417
1883
|
}
|
|
@@ -1425,11 +1891,14 @@ function create_fragment$i(ctx) {
|
|
|
1425
1891
|
if_block0.d(1);
|
|
1426
1892
|
if_block0 = null;
|
|
1427
1893
|
}
|
|
1428
|
-
if (!current || dirty & /*type*/
|
|
1429
|
-
attr(input, "type", /*type*/ ctx[
|
|
1894
|
+
if (!current || dirty & /*type*/ 128) {
|
|
1895
|
+
attr(input, "type", /*type*/ ctx[7]);
|
|
1896
|
+
}
|
|
1897
|
+
if (!current || dirty & /*passwordPlaceholder*/ 16) {
|
|
1898
|
+
attr(input, "placeholder", /*passwordPlaceholder*/ ctx[4]);
|
|
1430
1899
|
}
|
|
1431
|
-
if (!current || dirty & /*
|
|
1432
|
-
|
|
1900
|
+
if (!current || dirty & /*passwordValue*/ 1 && input_value_value !== (input_value_value = /*passwordValue*/ ctx[0] || "") && input.value !== input_value_value) {
|
|
1901
|
+
input.value = input_value_value;
|
|
1433
1902
|
}
|
|
1434
1903
|
var previous_block_index = current_block_type_index;
|
|
1435
1904
|
current_block_type_index = select_block_type(ctx);
|
|
@@ -1447,15 +1916,15 @@ function create_fragment$i(ctx) {
|
|
|
1447
1916
|
transition_in(if_block1, 1);
|
|
1448
1917
|
if_block1.m(div1, null);
|
|
1449
1918
|
}
|
|
1450
|
-
if ( /*inputError*/ctx[
|
|
1919
|
+
if ( /*inputError*/ctx[6]) {
|
|
1451
1920
|
if (if_block2) {
|
|
1452
1921
|
if_block2.p(ctx, dirty);
|
|
1453
|
-
if (dirty & /*inputError*/
|
|
1922
|
+
if (dirty & /*inputError*/ 64) {
|
|
1454
1923
|
transition_in(if_block2, 1);
|
|
1455
1924
|
}
|
|
1456
1925
|
}
|
|
1457
1926
|
else {
|
|
1458
|
-
if_block2 = create_if_block$
|
|
1927
|
+
if_block2 = create_if_block$7();
|
|
1459
1928
|
if_block2.c();
|
|
1460
1929
|
transition_in(if_block2, 1);
|
|
1461
1930
|
if_block2.m(div3, null);
|
|
@@ -1495,48 +1964,55 @@ function create_fragment$i(ctx) {
|
|
|
1495
1964
|
};
|
|
1496
1965
|
}
|
|
1497
1966
|
var errorMessage = "Minimum 8 characters required";
|
|
1498
|
-
function instance$
|
|
1967
|
+
function instance$b($$self, $$props, $$invalidate) {
|
|
1499
1968
|
var type;
|
|
1500
1969
|
var _a = $$props.showForgotPasswordLabel, showForgotPasswordLabel = _a === void 0 ? false : _a;
|
|
1501
1970
|
var _b = $$props.passwordInputValid, passwordInputValid = _b === void 0 ? false : _b;
|
|
1502
1971
|
var _c = $$props.passwordLabel, passwordLabel = _c === void 0 ? "Password" : _c;
|
|
1503
1972
|
var _d = $$props.passwordPlaceholder, passwordPlaceholder = _d === void 0 ? "Enter Password" : _d;
|
|
1973
|
+
var passwordValue = $$props.passwordValue;
|
|
1504
1974
|
var display = $$props.display;
|
|
1505
1975
|
var inputError = false;
|
|
1506
1976
|
var passwordVisible = false;
|
|
1507
1977
|
function togglePassword() {
|
|
1508
|
-
$$invalidate(
|
|
1978
|
+
$$invalidate(5, passwordVisible = !passwordVisible);
|
|
1979
|
+
}
|
|
1980
|
+
function handleInput(e) {
|
|
1981
|
+
$$invalidate(0, passwordValue = e.target.value);
|
|
1509
1982
|
}
|
|
1510
1983
|
var validateField = function (e) {
|
|
1511
1984
|
var hasValidPassword = e.target.value.length >= 8 ? true : false;
|
|
1512
1985
|
if (!hasValidPassword) {
|
|
1513
|
-
$$invalidate(
|
|
1514
|
-
$$invalidate(
|
|
1986
|
+
$$invalidate(11, passwordInputValid = false);
|
|
1987
|
+
$$invalidate(6, inputError = true);
|
|
1515
1988
|
}
|
|
1516
1989
|
else {
|
|
1517
|
-
$$invalidate(
|
|
1518
|
-
$$invalidate(
|
|
1990
|
+
$$invalidate(11, passwordInputValid = true);
|
|
1991
|
+
$$invalidate(6, inputError = false);
|
|
1519
1992
|
}
|
|
1520
1993
|
};
|
|
1521
|
-
var click_handler = function () { return $$invalidate(
|
|
1994
|
+
var click_handler = function () { return $$invalidate(1, display = "forgot_password"); };
|
|
1522
1995
|
$$self.$$set = function ($$props) {
|
|
1523
1996
|
if ('showForgotPasswordLabel' in $$props)
|
|
1524
|
-
$$invalidate(
|
|
1997
|
+
$$invalidate(2, showForgotPasswordLabel = $$props.showForgotPasswordLabel);
|
|
1525
1998
|
if ('passwordInputValid' in $$props)
|
|
1526
|
-
$$invalidate(
|
|
1999
|
+
$$invalidate(11, passwordInputValid = $$props.passwordInputValid);
|
|
1527
2000
|
if ('passwordLabel' in $$props)
|
|
1528
|
-
$$invalidate(
|
|
2001
|
+
$$invalidate(3, passwordLabel = $$props.passwordLabel);
|
|
1529
2002
|
if ('passwordPlaceholder' in $$props)
|
|
1530
|
-
$$invalidate(
|
|
2003
|
+
$$invalidate(4, passwordPlaceholder = $$props.passwordPlaceholder);
|
|
2004
|
+
if ('passwordValue' in $$props)
|
|
2005
|
+
$$invalidate(0, passwordValue = $$props.passwordValue);
|
|
1531
2006
|
if ('display' in $$props)
|
|
1532
|
-
$$invalidate(
|
|
2007
|
+
$$invalidate(1, display = $$props.display);
|
|
1533
2008
|
};
|
|
1534
2009
|
$$self.$$.update = function () {
|
|
1535
|
-
if ($$self.$$.dirty & /*passwordVisible*/
|
|
1536
|
-
$$invalidate(
|
|
2010
|
+
if ($$self.$$.dirty & /*passwordVisible*/ 32) {
|
|
2011
|
+
$$invalidate(7, type = passwordVisible ? "text" : "password");
|
|
1537
2012
|
}
|
|
1538
2013
|
};
|
|
1539
2014
|
return [
|
|
2015
|
+
passwordValue,
|
|
1540
2016
|
display,
|
|
1541
2017
|
showForgotPasswordLabel,
|
|
1542
2018
|
passwordLabel,
|
|
@@ -1545,6 +2021,7 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
1545
2021
|
inputError,
|
|
1546
2022
|
type,
|
|
1547
2023
|
togglePassword,
|
|
2024
|
+
handleInput,
|
|
1548
2025
|
validateField,
|
|
1549
2026
|
passwordInputValid,
|
|
1550
2027
|
click_handler
|
|
@@ -1554,19 +2031,20 @@ var PasswordInput = /** @class */ (function (_super) {
|
|
|
1554
2031
|
__extends(PasswordInput, _super);
|
|
1555
2032
|
function PasswordInput(options) {
|
|
1556
2033
|
var _this = _super.call(this) || this;
|
|
1557
|
-
init(_this, options, instance$
|
|
1558
|
-
showForgotPasswordLabel:
|
|
1559
|
-
passwordInputValid:
|
|
1560
|
-
passwordLabel:
|
|
1561
|
-
passwordPlaceholder:
|
|
1562
|
-
|
|
2034
|
+
init(_this, options, instance$b, create_fragment$k, safe_not_equal, {
|
|
2035
|
+
showForgotPasswordLabel: 2,
|
|
2036
|
+
passwordInputValid: 11,
|
|
2037
|
+
passwordLabel: 3,
|
|
2038
|
+
passwordPlaceholder: 4,
|
|
2039
|
+
passwordValue: 0,
|
|
2040
|
+
display: 1
|
|
1563
2041
|
});
|
|
1564
2042
|
return _this;
|
|
1565
2043
|
}
|
|
1566
2044
|
return PasswordInput;
|
|
1567
2045
|
}(SvelteComponent));
|
|
1568
2046
|
/* src/icons/SecuredIcon.svelte generated by Svelte v3.48.0 */
|
|
1569
|
-
function create_fragment$
|
|
2047
|
+
function create_fragment$j(ctx) {
|
|
1570
2048
|
var svg;
|
|
1571
2049
|
var path;
|
|
1572
2050
|
return {
|
|
@@ -1597,13 +2075,13 @@ var SecuredIcon = /** @class */ (function (_super) {
|
|
|
1597
2075
|
__extends(SecuredIcon, _super);
|
|
1598
2076
|
function SecuredIcon(options) {
|
|
1599
2077
|
var _this = _super.call(this) || this;
|
|
1600
|
-
init(_this, options, null, create_fragment$
|
|
2078
|
+
init(_this, options, null, create_fragment$j, safe_not_equal, {});
|
|
1601
2079
|
return _this;
|
|
1602
2080
|
}
|
|
1603
2081
|
return SecuredIcon;
|
|
1604
2082
|
}(SvelteComponent));
|
|
1605
2083
|
/* src/components/ModalFooter.svelte generated by Svelte v3.48.0 */
|
|
1606
|
-
function create_fragment$
|
|
2084
|
+
function create_fragment$i(ctx) {
|
|
1607
2085
|
var div;
|
|
1608
2086
|
var a;
|
|
1609
2087
|
var securedicon;
|
|
@@ -1649,13 +2127,13 @@ var ModalFooter = /** @class */ (function (_super) {
|
|
|
1649
2127
|
__extends(ModalFooter, _super);
|
|
1650
2128
|
function ModalFooter(options) {
|
|
1651
2129
|
var _this = _super.call(this) || this;
|
|
1652
|
-
init(_this, options, null, create_fragment$
|
|
2130
|
+
init(_this, options, null, create_fragment$i, safe_not_equal, {});
|
|
1653
2131
|
return _this;
|
|
1654
2132
|
}
|
|
1655
2133
|
return ModalFooter;
|
|
1656
2134
|
}(SvelteComponent));
|
|
1657
2135
|
/* src/modals/LoginModal.svelte generated by Svelte v3.48.0 */
|
|
1658
|
-
function create_if_block$
|
|
2136
|
+
function create_if_block$6(ctx) {
|
|
1659
2137
|
var div;
|
|
1660
2138
|
var button;
|
|
1661
2139
|
var mounted;
|
|
@@ -1666,6 +2144,7 @@ function create_if_block$3(ctx) {
|
|
|
1666
2144
|
button = element("button");
|
|
1667
2145
|
button.textContent = "Don't have an account?";
|
|
1668
2146
|
attr(button, "class", "ms-form__button ms-form__button--text");
|
|
2147
|
+
attr(button, "type", "button");
|
|
1669
2148
|
attr(div, "class", "ms-form__flex ms-form__flex--centered");
|
|
1670
2149
|
},
|
|
1671
2150
|
m: function (target, anchor) {
|
|
@@ -1685,7 +2164,7 @@ function create_if_block$3(ctx) {
|
|
|
1685
2164
|
}
|
|
1686
2165
|
};
|
|
1687
2166
|
}
|
|
1688
|
-
function create_fragment$
|
|
2167
|
+
function create_fragment$h(ctx) {
|
|
1689
2168
|
var div1;
|
|
1690
2169
|
var closebutton;
|
|
1691
2170
|
var t0;
|
|
@@ -1744,7 +2223,7 @@ function create_fragment$f(ctx) {
|
|
|
1744
2223
|
isLoading: /*showLoader*/ ctx[3]
|
|
1745
2224
|
}
|
|
1746
2225
|
});
|
|
1747
|
-
var if_block = /*params*/ ctx[2] && /*params*/ ctx[2].signup && /*params*/ ctx[2].signup.plans && create_if_block$
|
|
2226
|
+
var if_block = /*params*/ ctx[2] && /*params*/ ctx[2].signup && /*params*/ ctx[2].signup.plans && create_if_block$6(ctx);
|
|
1748
2227
|
modalfooter = new ModalFooter({});
|
|
1749
2228
|
return {
|
|
1750
2229
|
c: function () {
|
|
@@ -1837,7 +2316,7 @@ function create_fragment$f(ctx) {
|
|
|
1837
2316
|
if_block.p(ctx, dirty);
|
|
1838
2317
|
}
|
|
1839
2318
|
else {
|
|
1840
|
-
if_block = create_if_block$
|
|
2319
|
+
if_block = create_if_block$6(ctx);
|
|
1841
2320
|
if_block.c();
|
|
1842
2321
|
if_block.m(form, null);
|
|
1843
2322
|
}
|
|
@@ -1883,7 +2362,7 @@ function create_fragment$f(ctx) {
|
|
|
1883
2362
|
}
|
|
1884
2363
|
};
|
|
1885
2364
|
}
|
|
1886
|
-
function instance$
|
|
2365
|
+
function instance$a($$self, $$props, $$invalidate) {
|
|
1887
2366
|
var closeModal = $$props.closeModal;
|
|
1888
2367
|
var display = $$props.display;
|
|
1889
2368
|
var onSuccessLogin = $$props.onSuccessLogin;
|
|
@@ -1966,7 +2445,7 @@ var LoginModal = /** @class */ (function (_super) {
|
|
|
1966
2445
|
__extends(LoginModal, _super);
|
|
1967
2446
|
function LoginModal(options) {
|
|
1968
2447
|
var _this = _super.call(this) || this;
|
|
1969
|
-
init(_this, options, instance$
|
|
2448
|
+
init(_this, options, instance$a, create_fragment$h, safe_not_equal, {
|
|
1970
2449
|
closeModal: 1,
|
|
1971
2450
|
display: 0,
|
|
1972
2451
|
onSuccessLogin: 7,
|
|
@@ -1977,27 +2456,130 @@ var LoginModal = /** @class */ (function (_super) {
|
|
|
1977
2456
|
return LoginModal;
|
|
1978
2457
|
}(SvelteComponent));
|
|
1979
2458
|
/* src/modals/SignupModal.svelte generated by Svelte v3.48.0 */
|
|
1980
|
-
function
|
|
1981
|
-
var
|
|
1982
|
-
|
|
1983
|
-
|
|
2459
|
+
function get_each_context$1(ctx, list, i) {
|
|
2460
|
+
var child_ctx = ctx.slice();
|
|
2461
|
+
child_ctx[12] = list[i];
|
|
2462
|
+
child_ctx[14] = i;
|
|
2463
|
+
return child_ctx;
|
|
2464
|
+
}
|
|
2465
|
+
// (76:6) {#if customField.hidden !== true}
|
|
2466
|
+
function create_if_block$5(ctx) {
|
|
1984
2467
|
var div1;
|
|
1985
|
-
var
|
|
2468
|
+
var div0;
|
|
2469
|
+
var label;
|
|
2470
|
+
var t0_value = /*customField*/ ctx[12].label + "";
|
|
2471
|
+
var t0;
|
|
2472
|
+
var label_for_value;
|
|
1986
2473
|
var t1;
|
|
1987
|
-
var
|
|
1988
|
-
var
|
|
1989
|
-
var
|
|
2474
|
+
var input;
|
|
2475
|
+
var input_placeholder_value;
|
|
2476
|
+
var input_name_value;
|
|
2477
|
+
return {
|
|
2478
|
+
c: function () {
|
|
2479
|
+
div1 = element("div");
|
|
2480
|
+
div0 = element("div");
|
|
2481
|
+
label = element("label");
|
|
2482
|
+
t0 = text(t0_value);
|
|
2483
|
+
t1 = space();
|
|
2484
|
+
input = element("input");
|
|
2485
|
+
attr(label, "class", "ms-form__label");
|
|
2486
|
+
attr(label, "for", label_for_value = /*customField*/ ctx[12].key);
|
|
2487
|
+
attr(input, "class", "ms-form__input");
|
|
2488
|
+
attr(input, "data-ms-custom-field", "");
|
|
2489
|
+
attr(input, "type", "text");
|
|
2490
|
+
attr(input, "placeholder", input_placeholder_value = /*customField*/ ctx[12].label);
|
|
2491
|
+
attr(input, "name", input_name_value = /*customField*/ ctx[12].key);
|
|
2492
|
+
attr(div0, "class", "ms-form__group");
|
|
2493
|
+
attr(div1, "class", "ms-modal__custom-field-container");
|
|
2494
|
+
},
|
|
2495
|
+
m: function (target, anchor) {
|
|
2496
|
+
insert(target, div1, anchor);
|
|
2497
|
+
append(div1, div0);
|
|
2498
|
+
append(div0, label);
|
|
2499
|
+
append(label, t0);
|
|
2500
|
+
append(div0, t1);
|
|
2501
|
+
append(div0, input);
|
|
2502
|
+
},
|
|
2503
|
+
p: function (ctx, dirty) {
|
|
2504
|
+
if (dirty & /*$app*/ 32 && t0_value !== (t0_value = /*customField*/ ctx[12].label + ""))
|
|
2505
|
+
set_data(t0, t0_value);
|
|
2506
|
+
if (dirty & /*$app*/ 32 && label_for_value !== (label_for_value = /*customField*/ ctx[12].key)) {
|
|
2507
|
+
attr(label, "for", label_for_value);
|
|
2508
|
+
}
|
|
2509
|
+
if (dirty & /*$app*/ 32 && input_placeholder_value !== (input_placeholder_value = /*customField*/ ctx[12].label)) {
|
|
2510
|
+
attr(input, "placeholder", input_placeholder_value);
|
|
2511
|
+
}
|
|
2512
|
+
if (dirty & /*$app*/ 32 && input_name_value !== (input_name_value = /*customField*/ ctx[12].key)) {
|
|
2513
|
+
attr(input, "name", input_name_value);
|
|
2514
|
+
}
|
|
2515
|
+
},
|
|
2516
|
+
d: function (detaching) {
|
|
2517
|
+
if (detaching)
|
|
2518
|
+
detach(div1);
|
|
2519
|
+
}
|
|
2520
|
+
};
|
|
2521
|
+
}
|
|
2522
|
+
// (75:6) {#each $app.customFields as customField, i}
|
|
2523
|
+
function create_each_block$1(ctx) {
|
|
2524
|
+
var if_block_anchor;
|
|
2525
|
+
var if_block = /*customField*/ ctx[12].hidden !== true && create_if_block$5(ctx);
|
|
2526
|
+
return {
|
|
2527
|
+
c: function () {
|
|
2528
|
+
if (if_block)
|
|
2529
|
+
if_block.c();
|
|
2530
|
+
if_block_anchor = empty();
|
|
2531
|
+
},
|
|
2532
|
+
m: function (target, anchor) {
|
|
2533
|
+
if (if_block)
|
|
2534
|
+
if_block.m(target, anchor);
|
|
2535
|
+
insert(target, if_block_anchor, anchor);
|
|
2536
|
+
},
|
|
2537
|
+
p: function (ctx, dirty) {
|
|
2538
|
+
if ( /*customField*/ctx[12].hidden !== true) {
|
|
2539
|
+
if (if_block) {
|
|
2540
|
+
if_block.p(ctx, dirty);
|
|
2541
|
+
}
|
|
2542
|
+
else {
|
|
2543
|
+
if_block = create_if_block$5(ctx);
|
|
2544
|
+
if_block.c();
|
|
2545
|
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
else if (if_block) {
|
|
2549
|
+
if_block.d(1);
|
|
2550
|
+
if_block = null;
|
|
2551
|
+
}
|
|
2552
|
+
},
|
|
2553
|
+
d: function (detaching) {
|
|
2554
|
+
if (if_block)
|
|
2555
|
+
if_block.d(detaching);
|
|
2556
|
+
if (detaching)
|
|
2557
|
+
detach(if_block_anchor);
|
|
2558
|
+
}
|
|
2559
|
+
};
|
|
2560
|
+
}
|
|
2561
|
+
function create_fragment$g(ctx) {
|
|
2562
|
+
var div2;
|
|
2563
|
+
var closebutton;
|
|
2564
|
+
var t0;
|
|
2565
|
+
var div1;
|
|
2566
|
+
var figureelement;
|
|
2567
|
+
var t1;
|
|
2568
|
+
var h2;
|
|
2569
|
+
var t3;
|
|
2570
|
+
var form;
|
|
2571
|
+
var t4;
|
|
1990
2572
|
var emailinput;
|
|
1991
2573
|
var updating_emailInputValid;
|
|
1992
|
-
var
|
|
2574
|
+
var t5;
|
|
1993
2575
|
var passwordinput;
|
|
1994
2576
|
var updating_passwordInputValid;
|
|
1995
|
-
var t5;
|
|
1996
|
-
var submitbutton;
|
|
1997
2577
|
var t6;
|
|
2578
|
+
var submitbutton;
|
|
2579
|
+
var t7;
|
|
1998
2580
|
var div0;
|
|
1999
2581
|
var button;
|
|
2000
|
-
var
|
|
2582
|
+
var t9;
|
|
2001
2583
|
var modalfooter;
|
|
2002
2584
|
var current;
|
|
2003
2585
|
var mounted;
|
|
@@ -2006,8 +2588,13 @@ function create_fragment$e(ctx) {
|
|
|
2006
2588
|
props: { closeModal: /*closeModal*/ ctx[1] }
|
|
2007
2589
|
});
|
|
2008
2590
|
figureelement = new FigureElement({});
|
|
2591
|
+
var each_value = /*$app*/ ctx[5].customFields;
|
|
2592
|
+
var each_blocks = [];
|
|
2593
|
+
for (var i = 0; i < each_value.length; i += 1) {
|
|
2594
|
+
each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
|
|
2595
|
+
}
|
|
2009
2596
|
function emailinput_emailInputValid_binding(value) {
|
|
2010
|
-
/*emailinput_emailInputValid_binding*/ ctx[
|
|
2597
|
+
/*emailinput_emailInputValid_binding*/ ctx[9](value);
|
|
2011
2598
|
}
|
|
2012
2599
|
var emailinput_props = {};
|
|
2013
2600
|
if ( /*emailInputValid*/ctx[3] !== void 0) {
|
|
@@ -2016,7 +2603,7 @@ function create_fragment$e(ctx) {
|
|
|
2016
2603
|
emailinput = new EmailInput({ props: emailinput_props });
|
|
2017
2604
|
binding_callbacks.push(function () { return bind(emailinput, 'emailInputValid', emailinput_emailInputValid_binding); });
|
|
2018
2605
|
function passwordinput_passwordInputValid_binding(value) {
|
|
2019
|
-
/*passwordinput_passwordInputValid_binding*/ ctx[
|
|
2606
|
+
/*passwordinput_passwordInputValid_binding*/ ctx[10](value);
|
|
2020
2607
|
}
|
|
2021
2608
|
var passwordinput_props = {};
|
|
2022
2609
|
if ( /*passwordInputValid*/ctx[4] !== void 0) {
|
|
@@ -2043,16 +2630,20 @@ function create_fragment$e(ctx) {
|
|
|
2043
2630
|
h2.textContent = "Create an account";
|
|
2044
2631
|
t3 = space();
|
|
2045
2632
|
form = element("form");
|
|
2046
|
-
|
|
2633
|
+
for (var i = 0; i < each_blocks.length; i += 1) {
|
|
2634
|
+
each_blocks[i].c();
|
|
2635
|
+
}
|
|
2047
2636
|
t4 = space();
|
|
2048
|
-
create_component(
|
|
2637
|
+
create_component(emailinput.$$.fragment);
|
|
2049
2638
|
t5 = space();
|
|
2050
|
-
create_component(
|
|
2639
|
+
create_component(passwordinput.$$.fragment);
|
|
2051
2640
|
t6 = space();
|
|
2641
|
+
create_component(submitbutton.$$.fragment);
|
|
2642
|
+
t7 = space();
|
|
2052
2643
|
div0 = element("div");
|
|
2053
2644
|
button = element("button");
|
|
2054
2645
|
button.textContent = "Already have an account?";
|
|
2055
|
-
|
|
2646
|
+
t9 = space();
|
|
2056
2647
|
create_component(modalfooter.$$.fragment);
|
|
2057
2648
|
attr(h2, "class", "ms-modal__title");
|
|
2058
2649
|
attr(button, "class", "ms-form__button ms-form__button--text");
|
|
@@ -2075,21 +2666,25 @@ function create_fragment$e(ctx) {
|
|
|
2075
2666
|
append(div1, h2);
|
|
2076
2667
|
append(div1, t3);
|
|
2077
2668
|
append(div1, form);
|
|
2078
|
-
|
|
2669
|
+
for (var i = 0; i < each_blocks.length; i += 1) {
|
|
2670
|
+
each_blocks[i].m(form, null);
|
|
2671
|
+
}
|
|
2079
2672
|
append(form, t4);
|
|
2080
|
-
mount_component(
|
|
2673
|
+
mount_component(emailinput, form, null);
|
|
2081
2674
|
append(form, t5);
|
|
2082
|
-
mount_component(
|
|
2675
|
+
mount_component(passwordinput, form, null);
|
|
2083
2676
|
append(form, t6);
|
|
2677
|
+
mount_component(submitbutton, form, null);
|
|
2678
|
+
append(form, t7);
|
|
2084
2679
|
append(form, div0);
|
|
2085
2680
|
append(div0, button);
|
|
2086
|
-
append(div2,
|
|
2681
|
+
append(div2, t9);
|
|
2087
2682
|
mount_component(modalfooter, div2, null);
|
|
2088
2683
|
current = true;
|
|
2089
2684
|
if (!mounted) {
|
|
2090
2685
|
dispose = [
|
|
2091
|
-
listen(button, "click", /*click_handler*/ ctx[
|
|
2092
|
-
listen(form, "submit", stop_propagation(prevent_default(/*submitSignup*/ ctx[
|
|
2686
|
+
listen(button, "click", /*click_handler*/ ctx[11]),
|
|
2687
|
+
listen(form, "submit", stop_propagation(prevent_default(/*submitSignup*/ ctx[6])))
|
|
2093
2688
|
];
|
|
2094
2689
|
mounted = true;
|
|
2095
2690
|
}
|
|
@@ -2100,6 +2695,25 @@ function create_fragment$e(ctx) {
|
|
|
2100
2695
|
if (dirty & /*closeModal*/ 2)
|
|
2101
2696
|
closebutton_changes.closeModal = /*closeModal*/ ctx[1];
|
|
2102
2697
|
closebutton.$set(closebutton_changes);
|
|
2698
|
+
if (dirty & /*$app*/ 32) {
|
|
2699
|
+
each_value = /*$app*/ ctx[5].customFields;
|
|
2700
|
+
var i = void 0;
|
|
2701
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
2702
|
+
var child_ctx = get_each_context$1(ctx, each_value, i);
|
|
2703
|
+
if (each_blocks[i]) {
|
|
2704
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
2705
|
+
}
|
|
2706
|
+
else {
|
|
2707
|
+
each_blocks[i] = create_each_block$1(child_ctx);
|
|
2708
|
+
each_blocks[i].c();
|
|
2709
|
+
each_blocks[i].m(form, t4);
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
for (; i < each_blocks.length; i += 1) {
|
|
2713
|
+
each_blocks[i].d(1);
|
|
2714
|
+
}
|
|
2715
|
+
each_blocks.length = each_value.length;
|
|
2716
|
+
}
|
|
2103
2717
|
var emailinput_changes = {};
|
|
2104
2718
|
if (!updating_emailInputValid && dirty & /*emailInputValid*/ 8) {
|
|
2105
2719
|
updating_emailInputValid = true;
|
|
@@ -2144,6 +2758,7 @@ function create_fragment$e(ctx) {
|
|
|
2144
2758
|
detach(div2);
|
|
2145
2759
|
destroy_component(closebutton);
|
|
2146
2760
|
destroy_component(figureelement);
|
|
2761
|
+
destroy_each(each_blocks, detaching);
|
|
2147
2762
|
destroy_component(emailinput);
|
|
2148
2763
|
destroy_component(passwordinput);
|
|
2149
2764
|
destroy_component(submitbutton);
|
|
@@ -2153,7 +2768,9 @@ function create_fragment$e(ctx) {
|
|
|
2153
2768
|
}
|
|
2154
2769
|
};
|
|
2155
2770
|
}
|
|
2156
|
-
function instance$
|
|
2771
|
+
function instance$9($$self, $$props, $$invalidate) {
|
|
2772
|
+
var $app;
|
|
2773
|
+
component_subscribe($$self, AppStore, function ($$value) { return $$invalidate(5, $app = $$value); });
|
|
2157
2774
|
var closeModal = $$props.closeModal;
|
|
2158
2775
|
var display = $$props.display;
|
|
2159
2776
|
var onSuccessSignup = $$props.onSuccessSignup;
|
|
@@ -2164,12 +2781,17 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
2164
2781
|
function submitSignup(e) {
|
|
2165
2782
|
var _a;
|
|
2166
2783
|
return __awaiter(this, void 0, void 0, function () {
|
|
2167
|
-
var emailInput, passwordInput, plans, data, err_2;
|
|
2784
|
+
var emailInput, passwordInput, customFields, customFieldInputs, plans, data, err_2;
|
|
2168
2785
|
return __generator(this, function (_b) {
|
|
2169
2786
|
switch (_b.label) {
|
|
2170
2787
|
case 0:
|
|
2171
|
-
emailInput = e.target[
|
|
2172
|
-
passwordInput = e.target[
|
|
2788
|
+
emailInput = e.target.querySelector("[type=email]");
|
|
2789
|
+
passwordInput = e.target.querySelector("[type=password]");
|
|
2790
|
+
customFields = {};
|
|
2791
|
+
customFieldInputs = Array.from(e.target.querySelectorAll("[data-ms-custom-field]"));
|
|
2792
|
+
customFieldInputs.map(function (input) {
|
|
2793
|
+
customFields[input.getAttribute("name")] = input.value;
|
|
2794
|
+
}).length;
|
|
2173
2795
|
if (!emailInputValid || !passwordInputValid)
|
|
2174
2796
|
return [2 /*return*/];
|
|
2175
2797
|
$$invalidate(2, showLoader = true);
|
|
@@ -2182,7 +2804,8 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
2182
2804
|
return [4 /*yield*/, window.$memberstackDom.signupMemberEmailPassword({
|
|
2183
2805
|
email: emailInput.value,
|
|
2184
2806
|
password: passwordInput.value,
|
|
2185
|
-
plans: plans
|
|
2807
|
+
plans: plans,
|
|
2808
|
+
customFields: customFields
|
|
2186
2809
|
})];
|
|
2187
2810
|
case 2:
|
|
2188
2811
|
data = (_b.sent()).data;
|
|
@@ -2214,9 +2837,9 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
2214
2837
|
if ('display' in $$props)
|
|
2215
2838
|
$$invalidate(0, display = $$props.display);
|
|
2216
2839
|
if ('onSuccessSignup' in $$props)
|
|
2217
|
-
$$invalidate(
|
|
2840
|
+
$$invalidate(7, onSuccessSignup = $$props.onSuccessSignup);
|
|
2218
2841
|
if ('params' in $$props)
|
|
2219
|
-
$$invalidate(
|
|
2842
|
+
$$invalidate(8, params = $$props.params);
|
|
2220
2843
|
};
|
|
2221
2844
|
return [
|
|
2222
2845
|
display,
|
|
@@ -2224,6 +2847,7 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
2224
2847
|
showLoader,
|
|
2225
2848
|
emailInputValid,
|
|
2226
2849
|
passwordInputValid,
|
|
2850
|
+
$app,
|
|
2227
2851
|
submitSignup,
|
|
2228
2852
|
onSuccessSignup,
|
|
2229
2853
|
params,
|
|
@@ -2236,18 +2860,18 @@ var SignupModal = /** @class */ (function (_super) {
|
|
|
2236
2860
|
__extends(SignupModal, _super);
|
|
2237
2861
|
function SignupModal(options) {
|
|
2238
2862
|
var _this = _super.call(this) || this;
|
|
2239
|
-
init(_this, options, instance$
|
|
2863
|
+
init(_this, options, instance$9, create_fragment$g, safe_not_equal, {
|
|
2240
2864
|
closeModal: 1,
|
|
2241
2865
|
display: 0,
|
|
2242
|
-
onSuccessSignup:
|
|
2243
|
-
params:
|
|
2866
|
+
onSuccessSignup: 7,
|
|
2867
|
+
params: 8
|
|
2244
2868
|
});
|
|
2245
2869
|
return _this;
|
|
2246
2870
|
}
|
|
2247
2871
|
return SignupModal;
|
|
2248
2872
|
}(SvelteComponent));
|
|
2249
2873
|
/* src/icons/BackIcon.svelte generated by Svelte v3.48.0 */
|
|
2250
|
-
function create_fragment$
|
|
2874
|
+
function create_fragment$f(ctx) {
|
|
2251
2875
|
var svg;
|
|
2252
2876
|
var path;
|
|
2253
2877
|
return {
|
|
@@ -2277,13 +2901,13 @@ var BackIcon = /** @class */ (function (_super) {
|
|
|
2277
2901
|
__extends(BackIcon, _super);
|
|
2278
2902
|
function BackIcon(options) {
|
|
2279
2903
|
var _this = _super.call(this) || this;
|
|
2280
|
-
init(_this, options, null, create_fragment$
|
|
2904
|
+
init(_this, options, null, create_fragment$f, safe_not_equal, {});
|
|
2281
2905
|
return _this;
|
|
2282
2906
|
}
|
|
2283
2907
|
return BackIcon;
|
|
2284
2908
|
}(SvelteComponent));
|
|
2285
2909
|
/* src/modals/PassResetModal.svelte generated by Svelte v3.48.0 */
|
|
2286
|
-
function create_fragment$
|
|
2910
|
+
function create_fragment$e(ctx) {
|
|
2287
2911
|
var div3;
|
|
2288
2912
|
var div0;
|
|
2289
2913
|
var button;
|
|
@@ -2455,7 +3079,7 @@ function create_fragment$c(ctx) {
|
|
|
2455
3079
|
}
|
|
2456
3080
|
};
|
|
2457
3081
|
}
|
|
2458
|
-
function instance$
|
|
3082
|
+
function instance$8($$self, $$props, $$invalidate) {
|
|
2459
3083
|
var closeModal = $$props.closeModal;
|
|
2460
3084
|
var display = $$props.display;
|
|
2461
3085
|
var emailInputValid = false;
|
|
@@ -2516,13 +3140,13 @@ var PassResetModal = /** @class */ (function (_super) {
|
|
|
2516
3140
|
__extends(PassResetModal, _super);
|
|
2517
3141
|
function PassResetModal(options) {
|
|
2518
3142
|
var _this = _super.call(this) || this;
|
|
2519
|
-
init(_this, options, instance$
|
|
3143
|
+
init(_this, options, instance$8, create_fragment$e, safe_not_equal, { closeModal: 1, display: 0 });
|
|
2520
3144
|
return _this;
|
|
2521
3145
|
}
|
|
2522
3146
|
return PassResetModal;
|
|
2523
3147
|
}(SvelteComponent));
|
|
2524
3148
|
/* src/modals/PassTokenModal.svelte generated by Svelte v3.48.0 */
|
|
2525
|
-
function create_if_block$
|
|
3149
|
+
function create_if_block$4(ctx) {
|
|
2526
3150
|
var div;
|
|
2527
3151
|
var erroricon;
|
|
2528
3152
|
var t;
|
|
@@ -2558,7 +3182,7 @@ function create_if_block$2(ctx) {
|
|
|
2558
3182
|
}
|
|
2559
3183
|
};
|
|
2560
3184
|
}
|
|
2561
|
-
function create_fragment$
|
|
3185
|
+
function create_fragment$d(ctx) {
|
|
2562
3186
|
var div4;
|
|
2563
3187
|
var div0;
|
|
2564
3188
|
var button;
|
|
@@ -2594,7 +3218,7 @@ function create_fragment$b(ctx) {
|
|
|
2594
3218
|
props: { closeModal: /*closeModal*/ ctx[1] }
|
|
2595
3219
|
});
|
|
2596
3220
|
figureelement = new FigureElement({});
|
|
2597
|
-
var if_block = !ctx[3] && create_if_block$
|
|
3221
|
+
var if_block = !ctx[3] && create_if_block$4();
|
|
2598
3222
|
function passwordinput_passwordInputValid_binding(value) {
|
|
2599
3223
|
/*passwordinput_passwordInputValid_binding*/ ctx[8](value);
|
|
2600
3224
|
}
|
|
@@ -2712,7 +3336,7 @@ function create_fragment$b(ctx) {
|
|
|
2712
3336
|
}
|
|
2713
3337
|
}
|
|
2714
3338
|
else {
|
|
2715
|
-
if_block = create_if_block$
|
|
3339
|
+
if_block = create_if_block$4();
|
|
2716
3340
|
if_block.c();
|
|
2717
3341
|
transition_in(if_block, 1);
|
|
2718
3342
|
if_block.m(div1, null);
|
|
@@ -2775,7 +3399,7 @@ function create_fragment$b(ctx) {
|
|
|
2775
3399
|
}
|
|
2776
3400
|
};
|
|
2777
3401
|
}
|
|
2778
|
-
function instance$
|
|
3402
|
+
function instance$7($$self, $$props, $$invalidate) {
|
|
2779
3403
|
var closeModal = $$props.closeModal;
|
|
2780
3404
|
var display = $$props.display;
|
|
2781
3405
|
var onSuccessPasswordReset = $$props.onSuccessPasswordReset;
|
|
@@ -2783,7 +3407,7 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
2783
3407
|
var tokenInputValid = true;
|
|
2784
3408
|
var passwordInputValid = true;
|
|
2785
3409
|
onMount(function () {
|
|
2786
|
-
var tokenElements =
|
|
3410
|
+
var tokenElements = __spread(document.querySelectorAll("input.ms-form__input--token"));
|
|
2787
3411
|
tokenElements.forEach(function (ele, index) {
|
|
2788
3412
|
ele.addEventListener("keydown", function (e) {
|
|
2789
3413
|
if (e.keyCode === 8 && e.target.value === "")
|
|
@@ -2803,7 +3427,7 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
2803
3427
|
});
|
|
2804
3428
|
});
|
|
2805
3429
|
var validateFields = function (e) {
|
|
2806
|
-
var tokenElements =
|
|
3430
|
+
var tokenElements = __spread(document.querySelectorAll("input.ms-form__input--token"));
|
|
2807
3431
|
var hasEmpty = tokenElements.some(function (el) {
|
|
2808
3432
|
if (!el.value) {
|
|
2809
3433
|
return true;
|
|
@@ -2828,7 +3452,7 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
2828
3452
|
isValid = validateFields();
|
|
2829
3453
|
if (!isValid)
|
|
2830
3454
|
return [2 /*return*/];
|
|
2831
|
-
token =
|
|
3455
|
+
token = __spread(document.getElementsByName("token")).filter(function (_a) {
|
|
2832
3456
|
var name = _a.name;
|
|
2833
3457
|
return name;
|
|
2834
3458
|
}).map(function (_a) {
|
|
@@ -2845,6 +3469,7 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
2845
3469
|
window.$memberstackDom._showMessage("Password successfully reset", false);
|
|
2846
3470
|
onSuccessPasswordReset({ type: "PASSWORD_RESET", data: data });
|
|
2847
3471
|
$$invalidate(2, showLoader = false);
|
|
3472
|
+
$$invalidate(0, display = "reset_password_success");
|
|
2848
3473
|
return [3 /*break*/, 4];
|
|
2849
3474
|
case 3:
|
|
2850
3475
|
err_4 = _a.sent();
|
|
@@ -2888,7 +3513,7 @@ var PassTokenModal = /** @class */ (function (_super) {
|
|
|
2888
3513
|
__extends(PassTokenModal, _super);
|
|
2889
3514
|
function PassTokenModal(options) {
|
|
2890
3515
|
var _this = _super.call(this) || this;
|
|
2891
|
-
init(_this, options, instance$
|
|
3516
|
+
init(_this, options, instance$7, create_fragment$d, safe_not_equal, {
|
|
2892
3517
|
closeModal: 1,
|
|
2893
3518
|
display: 0,
|
|
2894
3519
|
onSuccessPasswordReset: 6
|
|
@@ -2897,8 +3522,117 @@ var PassTokenModal = /** @class */ (function (_super) {
|
|
|
2897
3522
|
}
|
|
2898
3523
|
return PassTokenModal;
|
|
2899
3524
|
}(SvelteComponent));
|
|
3525
|
+
/* src/modals/PassSuccessModal.svelte generated by Svelte v3.48.0 */
|
|
3526
|
+
function create_fragment$c(ctx) {
|
|
3527
|
+
var div2;
|
|
3528
|
+
var div0;
|
|
3529
|
+
var t0;
|
|
3530
|
+
var closebutton;
|
|
3531
|
+
var t1;
|
|
3532
|
+
var div1;
|
|
3533
|
+
var figureelement;
|
|
3534
|
+
var t2;
|
|
3535
|
+
var h2;
|
|
3536
|
+
var t4;
|
|
3537
|
+
var p;
|
|
3538
|
+
var t7;
|
|
3539
|
+
var modalfooter;
|
|
3540
|
+
var current;
|
|
3541
|
+
closebutton = new CloseButton({
|
|
3542
|
+
props: { closeModal: /*closeModal*/ ctx[0] }
|
|
3543
|
+
});
|
|
3544
|
+
figureelement = new FigureElement({});
|
|
3545
|
+
modalfooter = new ModalFooter({});
|
|
3546
|
+
return {
|
|
3547
|
+
c: function () {
|
|
3548
|
+
div2 = element("div");
|
|
3549
|
+
div0 = element("div");
|
|
3550
|
+
t0 = space();
|
|
3551
|
+
create_component(closebutton.$$.fragment);
|
|
3552
|
+
t1 = space();
|
|
3553
|
+
div1 = element("div");
|
|
3554
|
+
create_component(figureelement.$$.fragment);
|
|
3555
|
+
t2 = space();
|
|
3556
|
+
h2 = element("h2");
|
|
3557
|
+
h2.textContent = "Success!";
|
|
3558
|
+
t4 = space();
|
|
3559
|
+
p = element("p");
|
|
3560
|
+
p.innerHTML = "Your password has been reset. <br/>\n Please login with your new credentials.";
|
|
3561
|
+
t7 = space();
|
|
3562
|
+
create_component(modalfooter.$$.fragment);
|
|
3563
|
+
attr(div0, "data-cy", "back-btn");
|
|
3564
|
+
attr(div0, "class", "ms-modal__back");
|
|
3565
|
+
attr(h2, "class", "ms-modal__title ms-modal__title--sub-text");
|
|
3566
|
+
attr(p, "class", "ms-modal__text");
|
|
3567
|
+
attr(div1, "class", "ms-modal__content");
|
|
3568
|
+
attr(div2, "class", "ms-modal");
|
|
3569
|
+
attr(div2, "id", "PasswordSuccessModal");
|
|
3570
|
+
},
|
|
3571
|
+
m: function (target, anchor) {
|
|
3572
|
+
insert(target, div2, anchor);
|
|
3573
|
+
append(div2, div0);
|
|
3574
|
+
append(div2, t0);
|
|
3575
|
+
mount_component(closebutton, div2, null);
|
|
3576
|
+
append(div2, t1);
|
|
3577
|
+
append(div2, div1);
|
|
3578
|
+
mount_component(figureelement, div1, null);
|
|
3579
|
+
append(div1, t2);
|
|
3580
|
+
append(div1, h2);
|
|
3581
|
+
append(div1, t4);
|
|
3582
|
+
append(div1, p);
|
|
3583
|
+
append(div2, t7);
|
|
3584
|
+
mount_component(modalfooter, div2, null);
|
|
3585
|
+
current = true;
|
|
3586
|
+
},
|
|
3587
|
+
p: function (ctx, _a) {
|
|
3588
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
3589
|
+
var closebutton_changes = {};
|
|
3590
|
+
if (dirty & /*closeModal*/ 1)
|
|
3591
|
+
closebutton_changes.closeModal = /*closeModal*/ ctx[0];
|
|
3592
|
+
closebutton.$set(closebutton_changes);
|
|
3593
|
+
},
|
|
3594
|
+
i: function (local) {
|
|
3595
|
+
if (current)
|
|
3596
|
+
return;
|
|
3597
|
+
transition_in(closebutton.$$.fragment, local);
|
|
3598
|
+
transition_in(figureelement.$$.fragment, local);
|
|
3599
|
+
transition_in(modalfooter.$$.fragment, local);
|
|
3600
|
+
current = true;
|
|
3601
|
+
},
|
|
3602
|
+
o: function (local) {
|
|
3603
|
+
transition_out(closebutton.$$.fragment, local);
|
|
3604
|
+
transition_out(figureelement.$$.fragment, local);
|
|
3605
|
+
transition_out(modalfooter.$$.fragment, local);
|
|
3606
|
+
current = false;
|
|
3607
|
+
},
|
|
3608
|
+
d: function (detaching) {
|
|
3609
|
+
if (detaching)
|
|
3610
|
+
detach(div2);
|
|
3611
|
+
destroy_component(closebutton);
|
|
3612
|
+
destroy_component(figureelement);
|
|
3613
|
+
destroy_component(modalfooter);
|
|
3614
|
+
}
|
|
3615
|
+
};
|
|
3616
|
+
}
|
|
3617
|
+
function instance$6($$self, $$props, $$invalidate) {
|
|
3618
|
+
var closeModal = $$props.closeModal;
|
|
3619
|
+
$$self.$$set = function ($$props) {
|
|
3620
|
+
if ('closeModal' in $$props)
|
|
3621
|
+
$$invalidate(0, closeModal = $$props.closeModal);
|
|
3622
|
+
};
|
|
3623
|
+
return [closeModal];
|
|
3624
|
+
}
|
|
3625
|
+
var PassSuccessModal = /** @class */ (function (_super) {
|
|
3626
|
+
__extends(PassSuccessModal, _super);
|
|
3627
|
+
function PassSuccessModal(options) {
|
|
3628
|
+
var _this = _super.call(this) || this;
|
|
3629
|
+
init(_this, options, instance$6, create_fragment$c, safe_not_equal, { closeModal: 0 });
|
|
3630
|
+
return _this;
|
|
3631
|
+
}
|
|
3632
|
+
return PassSuccessModal;
|
|
3633
|
+
}(SvelteComponent));
|
|
2900
3634
|
/* src/icons/ProfileIcon.svelte generated by Svelte v3.48.0 */
|
|
2901
|
-
function create_fragment$
|
|
3635
|
+
function create_fragment$b(ctx) {
|
|
2902
3636
|
var svg;
|
|
2903
3637
|
var path;
|
|
2904
3638
|
return {
|
|
@@ -2928,13 +3662,13 @@ var ProfileIcon = /** @class */ (function (_super) {
|
|
|
2928
3662
|
__extends(ProfileIcon, _super);
|
|
2929
3663
|
function ProfileIcon(options) {
|
|
2930
3664
|
var _this = _super.call(this) || this;
|
|
2931
|
-
init(_this, options, null, create_fragment$
|
|
3665
|
+
init(_this, options, null, create_fragment$b, safe_not_equal, {});
|
|
2932
3666
|
return _this;
|
|
2933
3667
|
}
|
|
2934
3668
|
return ProfileIcon;
|
|
2935
3669
|
}(SvelteComponent));
|
|
2936
3670
|
/* src/icons/SecurityIcon.svelte generated by Svelte v3.48.0 */
|
|
2937
|
-
function create_fragment$
|
|
3671
|
+
function create_fragment$a(ctx) {
|
|
2938
3672
|
var svg;
|
|
2939
3673
|
var path;
|
|
2940
3674
|
return {
|
|
@@ -2964,13 +3698,13 @@ var SecurityIcon = /** @class */ (function (_super) {
|
|
|
2964
3698
|
__extends(SecurityIcon, _super);
|
|
2965
3699
|
function SecurityIcon(options) {
|
|
2966
3700
|
var _this = _super.call(this) || this;
|
|
2967
|
-
init(_this, options, null, create_fragment$
|
|
3701
|
+
init(_this, options, null, create_fragment$a, safe_not_equal, {});
|
|
2968
3702
|
return _this;
|
|
2969
3703
|
}
|
|
2970
3704
|
return SecurityIcon;
|
|
2971
3705
|
}(SvelteComponent));
|
|
2972
3706
|
/* src/icons/LinkOutIcon.svelte generated by Svelte v3.48.0 */
|
|
2973
|
-
function create_fragment$
|
|
3707
|
+
function create_fragment$9(ctx) {
|
|
2974
3708
|
var svg;
|
|
2975
3709
|
var path;
|
|
2976
3710
|
return {
|
|
@@ -3000,13 +3734,13 @@ var LinkOutIcon = /** @class */ (function (_super) {
|
|
|
3000
3734
|
__extends(LinkOutIcon, _super);
|
|
3001
3735
|
function LinkOutIcon(options) {
|
|
3002
3736
|
var _this = _super.call(this) || this;
|
|
3003
|
-
init(_this, options, null, create_fragment$
|
|
3737
|
+
init(_this, options, null, create_fragment$9, safe_not_equal, {});
|
|
3004
3738
|
return _this;
|
|
3005
3739
|
}
|
|
3006
3740
|
return LinkOutIcon;
|
|
3007
3741
|
}(SvelteComponent));
|
|
3008
3742
|
/* src/icons/LogoutIcon.svelte generated by Svelte v3.48.0 */
|
|
3009
|
-
function create_fragment$
|
|
3743
|
+
function create_fragment$8(ctx) {
|
|
3010
3744
|
var svg;
|
|
3011
3745
|
var path;
|
|
3012
3746
|
return {
|
|
@@ -3038,132 +3772,247 @@ var LogoutIcon = /** @class */ (function (_super) {
|
|
|
3038
3772
|
__extends(LogoutIcon, _super);
|
|
3039
3773
|
function LogoutIcon(options) {
|
|
3040
3774
|
var _this = _super.call(this) || this;
|
|
3041
|
-
init(_this, options, null, create_fragment$
|
|
3775
|
+
init(_this, options, null, create_fragment$8, safe_not_equal, {});
|
|
3042
3776
|
return _this;
|
|
3043
3777
|
}
|
|
3044
3778
|
return LogoutIcon;
|
|
3045
3779
|
}(SvelteComponent));
|
|
3046
3780
|
/* src/components/ProfileModalNav.svelte generated by Svelte v3.48.0 */
|
|
3047
|
-
function
|
|
3048
|
-
var
|
|
3781
|
+
function create_if_block_1$2(ctx) {
|
|
3782
|
+
var button;
|
|
3049
3783
|
var profileicon;
|
|
3050
|
-
var
|
|
3051
|
-
var t1;
|
|
3052
|
-
var button1;
|
|
3053
|
-
var securityicon;
|
|
3054
|
-
var t2;
|
|
3055
|
-
var t3;
|
|
3056
|
-
var button2;
|
|
3057
|
-
var linkouticon;
|
|
3058
|
-
var t4;
|
|
3059
|
-
var t5;
|
|
3060
|
-
var button3;
|
|
3061
|
-
var logouticon;
|
|
3062
|
-
var t6;
|
|
3784
|
+
var t;
|
|
3063
3785
|
var current;
|
|
3064
3786
|
var mounted;
|
|
3065
3787
|
var dispose;
|
|
3066
3788
|
profileicon = new ProfileIcon({});
|
|
3067
|
-
|
|
3789
|
+
return {
|
|
3790
|
+
c: function () {
|
|
3791
|
+
button = element("button");
|
|
3792
|
+
create_component(profileicon.$$.fragment);
|
|
3793
|
+
t = text(" Profile");
|
|
3794
|
+
attr(button, "class", "ms-modal__profile-option");
|
|
3795
|
+
toggle_class(button, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "profile");
|
|
3796
|
+
},
|
|
3797
|
+
m: function (target, anchor) {
|
|
3798
|
+
insert(target, button, anchor);
|
|
3799
|
+
mount_component(profileicon, button, null);
|
|
3800
|
+
append(button, t);
|
|
3801
|
+
current = true;
|
|
3802
|
+
if (!mounted) {
|
|
3803
|
+
dispose = listen(button, "click", /*click_handler*/ ctx[7]);
|
|
3804
|
+
mounted = true;
|
|
3805
|
+
}
|
|
3806
|
+
},
|
|
3807
|
+
p: function (ctx, dirty) {
|
|
3808
|
+
if (dirty & /*displayProfile*/ 1) {
|
|
3809
|
+
toggle_class(button, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "profile");
|
|
3810
|
+
}
|
|
3811
|
+
},
|
|
3812
|
+
i: function (local) {
|
|
3813
|
+
if (current)
|
|
3814
|
+
return;
|
|
3815
|
+
transition_in(profileicon.$$.fragment, local);
|
|
3816
|
+
current = true;
|
|
3817
|
+
},
|
|
3818
|
+
o: function (local) {
|
|
3819
|
+
transition_out(profileicon.$$.fragment, local);
|
|
3820
|
+
current = false;
|
|
3821
|
+
},
|
|
3822
|
+
d: function (detaching) {
|
|
3823
|
+
if (detaching)
|
|
3824
|
+
detach(button);
|
|
3825
|
+
destroy_component(profileicon);
|
|
3826
|
+
mounted = false;
|
|
3827
|
+
dispose();
|
|
3828
|
+
}
|
|
3829
|
+
};
|
|
3830
|
+
}
|
|
3831
|
+
// (63:0) {#if member.stripeCustomerId}
|
|
3832
|
+
function create_if_block$3(ctx) {
|
|
3833
|
+
var button;
|
|
3834
|
+
var linkouticon;
|
|
3835
|
+
var t;
|
|
3836
|
+
var current;
|
|
3837
|
+
var mounted;
|
|
3838
|
+
var dispose;
|
|
3068
3839
|
linkouticon = new LinkOutIcon({});
|
|
3840
|
+
return {
|
|
3841
|
+
c: function () {
|
|
3842
|
+
button = element("button");
|
|
3843
|
+
create_component(linkouticon.$$.fragment);
|
|
3844
|
+
t = text(" Billing Portal");
|
|
3845
|
+
attr(button, "class", "ms-modal__profile-option");
|
|
3846
|
+
},
|
|
3847
|
+
m: function (target, anchor) {
|
|
3848
|
+
insert(target, button, anchor);
|
|
3849
|
+
mount_component(linkouticon, button, null);
|
|
3850
|
+
append(button, t);
|
|
3851
|
+
current = true;
|
|
3852
|
+
if (!mounted) {
|
|
3853
|
+
dispose = listen(button, "click", /*launchPortal*/ ctx[4]);
|
|
3854
|
+
mounted = true;
|
|
3855
|
+
}
|
|
3856
|
+
},
|
|
3857
|
+
p: noop,
|
|
3858
|
+
i: function (local) {
|
|
3859
|
+
if (current)
|
|
3860
|
+
return;
|
|
3861
|
+
transition_in(linkouticon.$$.fragment, local);
|
|
3862
|
+
current = true;
|
|
3863
|
+
},
|
|
3864
|
+
o: function (local) {
|
|
3865
|
+
transition_out(linkouticon.$$.fragment, local);
|
|
3866
|
+
current = false;
|
|
3867
|
+
},
|
|
3868
|
+
d: function (detaching) {
|
|
3869
|
+
if (detaching)
|
|
3870
|
+
detach(button);
|
|
3871
|
+
destroy_component(linkouticon);
|
|
3872
|
+
mounted = false;
|
|
3873
|
+
dispose();
|
|
3874
|
+
}
|
|
3875
|
+
};
|
|
3876
|
+
}
|
|
3877
|
+
function create_fragment$7(ctx) {
|
|
3878
|
+
var t0;
|
|
3879
|
+
var button0;
|
|
3880
|
+
var securityicon;
|
|
3881
|
+
var t1;
|
|
3882
|
+
var t2;
|
|
3883
|
+
var t3;
|
|
3884
|
+
var button1;
|
|
3885
|
+
var logouticon;
|
|
3886
|
+
var t4;
|
|
3887
|
+
var current;
|
|
3888
|
+
var mounted;
|
|
3889
|
+
var dispose;
|
|
3890
|
+
var if_block0 = !ctx[2] && create_if_block_1$2(ctx);
|
|
3891
|
+
securityicon = new SecurityIcon({});
|
|
3892
|
+
var if_block1 = /*member*/ ctx[1].stripeCustomerId && create_if_block$3(ctx);
|
|
3069
3893
|
logouticon = new LogoutIcon({});
|
|
3070
3894
|
return {
|
|
3071
3895
|
c: function () {
|
|
3896
|
+
if (if_block0)
|
|
3897
|
+
if_block0.c();
|
|
3898
|
+
t0 = space();
|
|
3072
3899
|
button0 = element("button");
|
|
3073
|
-
create_component(profileicon.$$.fragment);
|
|
3074
|
-
t0 = text(" Profile");
|
|
3075
|
-
t1 = space();
|
|
3076
|
-
button1 = element("button");
|
|
3077
3900
|
create_component(securityicon.$$.fragment);
|
|
3078
|
-
|
|
3901
|
+
t1 = text(" Security");
|
|
3902
|
+
t2 = space();
|
|
3903
|
+
if (if_block1)
|
|
3904
|
+
if_block1.c();
|
|
3079
3905
|
t3 = space();
|
|
3080
|
-
|
|
3081
|
-
create_component(linkouticon.$$.fragment);
|
|
3082
|
-
t4 = text(" Billing Portal");
|
|
3083
|
-
t5 = space();
|
|
3084
|
-
button3 = element("button");
|
|
3906
|
+
button1 = element("button");
|
|
3085
3907
|
create_component(logouticon.$$.fragment);
|
|
3086
|
-
|
|
3908
|
+
t4 = text(" Logout");
|
|
3087
3909
|
attr(button0, "class", "ms-modal__profile-option");
|
|
3088
|
-
toggle_class(button0, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "
|
|
3910
|
+
toggle_class(button0, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "security" || /*displayProfile*/ ctx[0] === "changePassword");
|
|
3089
3911
|
attr(button1, "class", "ms-modal__profile-option");
|
|
3090
|
-
toggle_class(button1, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "security" || /*displayProfile*/ ctx[0] === "changePassword");
|
|
3091
|
-
attr(button2, "class", "ms-modal__profile-option");
|
|
3092
|
-
attr(button3, "class", "ms-modal__profile-option");
|
|
3093
3912
|
},
|
|
3094
3913
|
m: function (target, anchor) {
|
|
3914
|
+
if (if_block0)
|
|
3915
|
+
if_block0.m(target, anchor);
|
|
3916
|
+
insert(target, t0, anchor);
|
|
3095
3917
|
insert(target, button0, anchor);
|
|
3096
|
-
mount_component(
|
|
3097
|
-
append(button0,
|
|
3098
|
-
insert(target,
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
append(button1, t2);
|
|
3918
|
+
mount_component(securityicon, button0, null);
|
|
3919
|
+
append(button0, t1);
|
|
3920
|
+
insert(target, t2, anchor);
|
|
3921
|
+
if (if_block1)
|
|
3922
|
+
if_block1.m(target, anchor);
|
|
3102
3923
|
insert(target, t3, anchor);
|
|
3103
|
-
insert(target,
|
|
3104
|
-
mount_component(
|
|
3105
|
-
append(
|
|
3106
|
-
insert(target, t5, anchor);
|
|
3107
|
-
insert(target, button3, anchor);
|
|
3108
|
-
mount_component(logouticon, button3, null);
|
|
3109
|
-
append(button3, t6);
|
|
3924
|
+
insert(target, button1, anchor);
|
|
3925
|
+
mount_component(logouticon, button1, null);
|
|
3926
|
+
append(button1, t4);
|
|
3110
3927
|
current = true;
|
|
3111
3928
|
if (!mounted) {
|
|
3112
3929
|
dispose = [
|
|
3113
|
-
listen(button0, "click", /*
|
|
3114
|
-
listen(button1, "click", /*
|
|
3115
|
-
listen(button2, "click", function () {
|
|
3116
|
-
if (is_function(/*displayBilling*/ ctx[1])) /*displayBilling*/
|
|
3117
|
-
ctx[1].apply(this, arguments);
|
|
3118
|
-
})
|
|
3930
|
+
listen(button0, "click", /*click_handler_1*/ ctx[8]),
|
|
3931
|
+
listen(button1, "click", /*logout*/ ctx[3])
|
|
3119
3932
|
];
|
|
3120
3933
|
mounted = true;
|
|
3121
3934
|
}
|
|
3122
3935
|
},
|
|
3123
|
-
p: function (
|
|
3936
|
+
p: function (ctx, _a) {
|
|
3124
3937
|
var _b = __read(_a, 1), dirty = _b[0];
|
|
3125
|
-
ctx
|
|
3126
|
-
|
|
3127
|
-
|
|
3938
|
+
if (!ctx[2]) {
|
|
3939
|
+
if (if_block0) {
|
|
3940
|
+
if_block0.p(ctx, dirty);
|
|
3941
|
+
if (dirty & /*hideProfileSection*/ 4) {
|
|
3942
|
+
transition_in(if_block0, 1);
|
|
3943
|
+
}
|
|
3944
|
+
}
|
|
3945
|
+
else {
|
|
3946
|
+
if_block0 = create_if_block_1$2(ctx);
|
|
3947
|
+
if_block0.c();
|
|
3948
|
+
transition_in(if_block0, 1);
|
|
3949
|
+
if_block0.m(t0.parentNode, t0);
|
|
3950
|
+
}
|
|
3951
|
+
}
|
|
3952
|
+
else if (if_block0) {
|
|
3953
|
+
group_outros();
|
|
3954
|
+
transition_out(if_block0, 1, 1, function () {
|
|
3955
|
+
if_block0 = null;
|
|
3956
|
+
});
|
|
3957
|
+
check_outros();
|
|
3128
3958
|
}
|
|
3129
3959
|
if (dirty & /*displayProfile*/ 1) {
|
|
3130
|
-
toggle_class(
|
|
3960
|
+
toggle_class(button0, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "security" || /*displayProfile*/ ctx[0] === "changePassword");
|
|
3961
|
+
}
|
|
3962
|
+
if ( /*member*/ctx[1].stripeCustomerId) {
|
|
3963
|
+
if (if_block1) {
|
|
3964
|
+
if_block1.p(ctx, dirty);
|
|
3965
|
+
if (dirty & /*member*/ 2) {
|
|
3966
|
+
transition_in(if_block1, 1);
|
|
3967
|
+
}
|
|
3968
|
+
}
|
|
3969
|
+
else {
|
|
3970
|
+
if_block1 = create_if_block$3(ctx);
|
|
3971
|
+
if_block1.c();
|
|
3972
|
+
transition_in(if_block1, 1);
|
|
3973
|
+
if_block1.m(t3.parentNode, t3);
|
|
3974
|
+
}
|
|
3975
|
+
}
|
|
3976
|
+
else if (if_block1) {
|
|
3977
|
+
group_outros();
|
|
3978
|
+
transition_out(if_block1, 1, 1, function () {
|
|
3979
|
+
if_block1 = null;
|
|
3980
|
+
});
|
|
3981
|
+
check_outros();
|
|
3131
3982
|
}
|
|
3132
3983
|
},
|
|
3133
3984
|
i: function (local) {
|
|
3134
3985
|
if (current)
|
|
3135
3986
|
return;
|
|
3136
|
-
transition_in(
|
|
3987
|
+
transition_in(if_block0);
|
|
3137
3988
|
transition_in(securityicon.$$.fragment, local);
|
|
3138
|
-
transition_in(
|
|
3989
|
+
transition_in(if_block1);
|
|
3139
3990
|
transition_in(logouticon.$$.fragment, local);
|
|
3140
3991
|
current = true;
|
|
3141
3992
|
},
|
|
3142
3993
|
o: function (local) {
|
|
3143
|
-
transition_out(
|
|
3994
|
+
transition_out(if_block0);
|
|
3144
3995
|
transition_out(securityicon.$$.fragment, local);
|
|
3145
|
-
transition_out(
|
|
3996
|
+
transition_out(if_block1);
|
|
3146
3997
|
transition_out(logouticon.$$.fragment, local);
|
|
3147
3998
|
current = false;
|
|
3148
3999
|
},
|
|
3149
4000
|
d: function (detaching) {
|
|
4001
|
+
if (if_block0)
|
|
4002
|
+
if_block0.d(detaching);
|
|
3150
4003
|
if (detaching)
|
|
3151
|
-
detach(
|
|
3152
|
-
destroy_component(profileicon);
|
|
3153
|
-
if (detaching)
|
|
3154
|
-
detach(t1);
|
|
4004
|
+
detach(t0);
|
|
3155
4005
|
if (detaching)
|
|
3156
|
-
detach(
|
|
4006
|
+
detach(button0);
|
|
3157
4007
|
destroy_component(securityicon);
|
|
3158
4008
|
if (detaching)
|
|
3159
|
-
detach(
|
|
3160
|
-
if (
|
|
3161
|
-
|
|
3162
|
-
destroy_component(linkouticon);
|
|
4009
|
+
detach(t2);
|
|
4010
|
+
if (if_block1)
|
|
4011
|
+
if_block1.d(detaching);
|
|
3163
4012
|
if (detaching)
|
|
3164
|
-
detach(
|
|
4013
|
+
detach(t3);
|
|
3165
4014
|
if (detaching)
|
|
3166
|
-
detach(
|
|
4015
|
+
detach(button1);
|
|
3167
4016
|
destroy_component(logouticon);
|
|
3168
4017
|
mounted = false;
|
|
3169
4018
|
run_all(dispose);
|
|
@@ -3171,48 +4020,127 @@ function create_fragment$6(ctx) {
|
|
|
3171
4020
|
};
|
|
3172
4021
|
}
|
|
3173
4022
|
function instance$5($$self, $$props, $$invalidate) {
|
|
4023
|
+
var member = $$props.member;
|
|
4024
|
+
var onSuccessLogout = $$props.onSuccessLogout;
|
|
3174
4025
|
var displayProfile = $$props.displayProfile;
|
|
3175
|
-
var
|
|
4026
|
+
var profileLoader = $$props.profileLoader;
|
|
4027
|
+
var hideProfileSection = $$props.hideProfileSection;
|
|
4028
|
+
var unsubscribe = AppStore.subscribe(function (data) {
|
|
4029
|
+
if (!data.initialValue) {
|
|
4030
|
+
var container = document.getElementById("msOverlay");
|
|
4031
|
+
var css = document.createElement("style");
|
|
4032
|
+
var color = data.branding.colors.lightMode.primaryButton;
|
|
4033
|
+
var fullCSS = ".ms-modal__profile-option:hover { color: " + color + ";} .ms-modal__profile-option--active { color: " + color + ";} .ms-modal__save-button { background: " + color + ";} .ms-modal__save-button:disabled { background: " + color + ";}";
|
|
4034
|
+
css.appendChild(document.createTextNode(fullCSS));
|
|
4035
|
+
container.appendChild(css);
|
|
4036
|
+
}
|
|
4037
|
+
});
|
|
4038
|
+
onDestroy(function () {
|
|
4039
|
+
unsubscribe();
|
|
4040
|
+
});
|
|
4041
|
+
function logout(e) {
|
|
4042
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4043
|
+
var data, err_5;
|
|
4044
|
+
return __generator(this, function (_a) {
|
|
4045
|
+
switch (_a.label) {
|
|
4046
|
+
case 0:
|
|
4047
|
+
_a.trys.push([0, 2, , 3]);
|
|
4048
|
+
return [4 /*yield*/, window.$memberstackDom.logout()];
|
|
4049
|
+
case 1:
|
|
4050
|
+
data = (_a.sent()).data;
|
|
4051
|
+
window.$memberstackDom._showMessage("Logout successful", false);
|
|
4052
|
+
onSuccessLogout({ type: "LOGOUT", data: data });
|
|
4053
|
+
return [3 /*break*/, 3];
|
|
4054
|
+
case 2:
|
|
4055
|
+
err_5 = _a.sent();
|
|
4056
|
+
window.$memberstackDom._showMessage(err_5.message, true);
|
|
4057
|
+
return [3 /*break*/, 3];
|
|
4058
|
+
case 3: return [2 /*return*/];
|
|
4059
|
+
}
|
|
4060
|
+
});
|
|
4061
|
+
});
|
|
4062
|
+
}
|
|
4063
|
+
function launchPortal(e) {
|
|
4064
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4065
|
+
return __generator(this, function (_a) {
|
|
4066
|
+
switch (_a.label) {
|
|
4067
|
+
case 0:
|
|
4068
|
+
$$invalidate(5, profileLoader = true);
|
|
4069
|
+
return [4 /*yield*/, window.$memberstackDom.launchStripeCustomerPortal({ priceIds: [], autoRedirect: true })];
|
|
4070
|
+
case 1:
|
|
4071
|
+
_a.sent();
|
|
4072
|
+
return [2 /*return*/];
|
|
4073
|
+
}
|
|
4074
|
+
});
|
|
4075
|
+
});
|
|
4076
|
+
}
|
|
3176
4077
|
var click_handler = function () { return $$invalidate(0, displayProfile = "profile"); };
|
|
3177
4078
|
var click_handler_1 = function () { return $$invalidate(0, displayProfile = "security"); };
|
|
3178
4079
|
$$self.$$set = function ($$props) {
|
|
4080
|
+
if ('member' in $$props)
|
|
4081
|
+
$$invalidate(1, member = $$props.member);
|
|
4082
|
+
if ('onSuccessLogout' in $$props)
|
|
4083
|
+
$$invalidate(6, onSuccessLogout = $$props.onSuccessLogout);
|
|
3179
4084
|
if ('displayProfile' in $$props)
|
|
3180
4085
|
$$invalidate(0, displayProfile = $$props.displayProfile);
|
|
3181
|
-
if ('
|
|
3182
|
-
$$invalidate(
|
|
4086
|
+
if ('profileLoader' in $$props)
|
|
4087
|
+
$$invalidate(5, profileLoader = $$props.profileLoader);
|
|
4088
|
+
if ('hideProfileSection' in $$props)
|
|
4089
|
+
$$invalidate(2, hideProfileSection = $$props.hideProfileSection);
|
|
3183
4090
|
};
|
|
3184
|
-
return [
|
|
4091
|
+
return [
|
|
4092
|
+
displayProfile,
|
|
4093
|
+
member,
|
|
4094
|
+
hideProfileSection,
|
|
4095
|
+
logout,
|
|
4096
|
+
launchPortal,
|
|
4097
|
+
profileLoader,
|
|
4098
|
+
onSuccessLogout,
|
|
4099
|
+
click_handler,
|
|
4100
|
+
click_handler_1
|
|
4101
|
+
];
|
|
3185
4102
|
}
|
|
3186
4103
|
var ProfileModalNav = /** @class */ (function (_super) {
|
|
3187
4104
|
__extends(ProfileModalNav, _super);
|
|
3188
4105
|
function ProfileModalNav(options) {
|
|
3189
4106
|
var _this = _super.call(this) || this;
|
|
3190
|
-
init(_this, options, instance$5, create_fragment$
|
|
4107
|
+
init(_this, options, instance$5, create_fragment$7, safe_not_equal, {
|
|
4108
|
+
member: 1,
|
|
4109
|
+
onSuccessLogout: 6,
|
|
4110
|
+
displayProfile: 0,
|
|
4111
|
+
profileLoader: 5,
|
|
4112
|
+
hideProfileSection: 2
|
|
4113
|
+
});
|
|
3191
4114
|
return _this;
|
|
3192
4115
|
}
|
|
3193
4116
|
return ProfileModalNav;
|
|
3194
4117
|
}(SvelteComponent));
|
|
3195
|
-
/* src/components/
|
|
4118
|
+
/* src/components/ProfileInfoContent.svelte generated by Svelte v3.48.0 */
|
|
3196
4119
|
function get_each_context(ctx, list, i) {
|
|
3197
4120
|
var child_ctx = ctx.slice();
|
|
3198
|
-
child_ctx[
|
|
3199
|
-
child_ctx[
|
|
4121
|
+
child_ctx[5] = list[i];
|
|
4122
|
+
child_ctx[6] = list;
|
|
4123
|
+
child_ctx[7] = i;
|
|
3200
4124
|
return child_ctx;
|
|
3201
4125
|
}
|
|
3202
|
-
// (
|
|
3203
|
-
function
|
|
4126
|
+
// (26:2) {#if customField.hidden !== true}
|
|
4127
|
+
function create_if_block$2(ctx) {
|
|
3204
4128
|
var div1;
|
|
3205
4129
|
var div0;
|
|
3206
4130
|
var label;
|
|
3207
|
-
var t0_value = /*customField*/ ctx[
|
|
4131
|
+
var t0_value = /*customField*/ ctx[5].label + "";
|
|
3208
4132
|
var t0;
|
|
3209
4133
|
var label_for_value;
|
|
3210
4134
|
var t1;
|
|
3211
4135
|
var input;
|
|
3212
4136
|
var input_placeholder_value;
|
|
3213
4137
|
var input_name_value;
|
|
3214
|
-
var input_value_value;
|
|
3215
4138
|
var t2;
|
|
4139
|
+
var mounted;
|
|
4140
|
+
var dispose;
|
|
4141
|
+
function input_input_handler() {
|
|
4142
|
+
/*input_input_handler*/ ctx[4].call(input, /*customField*/ ctx[5]);
|
|
4143
|
+
}
|
|
3216
4144
|
return {
|
|
3217
4145
|
c: function () {
|
|
3218
4146
|
div1 = element("div");
|
|
@@ -3223,12 +4151,11 @@ function create_each_block(ctx) {
|
|
|
3223
4151
|
input = element("input");
|
|
3224
4152
|
t2 = space();
|
|
3225
4153
|
attr(label, "class", "ms-form__label");
|
|
3226
|
-
attr(label, "for", label_for_value = /*customField*/ ctx[
|
|
4154
|
+
attr(label, "for", label_for_value = /*customField*/ ctx[5].key);
|
|
3227
4155
|
attr(input, "class", "ms-form__input");
|
|
3228
4156
|
attr(input, "type", "text");
|
|
3229
|
-
attr(input, "placeholder", input_placeholder_value = /*customField*/ ctx[
|
|
3230
|
-
attr(input, "name", input_name_value = /*customField*/ ctx[
|
|
3231
|
-
input.value = input_value_value = /*customField*/ ctx[1].value;
|
|
4157
|
+
attr(input, "placeholder", input_placeholder_value = /*customField*/ ctx[5].label);
|
|
4158
|
+
attr(input, "name", input_name_value = /*customField*/ ctx[5].key);
|
|
3232
4159
|
attr(div0, "class", "ms-form__group");
|
|
3233
4160
|
attr(div1, "class", "ms-modal__custom-field-container");
|
|
3234
4161
|
},
|
|
@@ -3239,22 +4166,88 @@ function create_each_block(ctx) {
|
|
|
3239
4166
|
append(label, t0);
|
|
3240
4167
|
append(div0, t1);
|
|
3241
4168
|
append(div0, input);
|
|
4169
|
+
set_input_value(input, /*member*/ ctx[0].customFields[ /*customField*/ctx[5].key]);
|
|
3242
4170
|
append(div1, t2);
|
|
4171
|
+
if (!mounted) {
|
|
4172
|
+
dispose = listen(input, "input", input_input_handler);
|
|
4173
|
+
mounted = true;
|
|
4174
|
+
}
|
|
4175
|
+
},
|
|
4176
|
+
p: function (new_ctx, dirty) {
|
|
4177
|
+
ctx = new_ctx;
|
|
4178
|
+
if (dirty & /*customFields*/ 2 && t0_value !== (t0_value = /*customField*/ ctx[5].label + ""))
|
|
4179
|
+
set_data(t0, t0_value);
|
|
4180
|
+
if (dirty & /*customFields*/ 2 && label_for_value !== (label_for_value = /*customField*/ ctx[5].key)) {
|
|
4181
|
+
attr(label, "for", label_for_value);
|
|
4182
|
+
}
|
|
4183
|
+
if (dirty & /*customFields*/ 2 && input_placeholder_value !== (input_placeholder_value = /*customField*/ ctx[5].label)) {
|
|
4184
|
+
attr(input, "placeholder", input_placeholder_value);
|
|
4185
|
+
}
|
|
4186
|
+
if (dirty & /*customFields*/ 2 && input_name_value !== (input_name_value = /*customField*/ ctx[5].key)) {
|
|
4187
|
+
attr(input, "name", input_name_value);
|
|
4188
|
+
}
|
|
4189
|
+
if (dirty & /*member, customFields*/ 3 && input.value !== /*member*/ ctx[0].customFields[ /*customField*/ctx[5].key]) {
|
|
4190
|
+
set_input_value(input, /*member*/ ctx[0].customFields[ /*customField*/ctx[5].key]);
|
|
4191
|
+
}
|
|
3243
4192
|
},
|
|
3244
|
-
p: noop,
|
|
3245
4193
|
d: function (detaching) {
|
|
3246
4194
|
if (detaching)
|
|
3247
4195
|
detach(div1);
|
|
4196
|
+
mounted = false;
|
|
4197
|
+
dispose();
|
|
3248
4198
|
}
|
|
3249
4199
|
};
|
|
3250
4200
|
}
|
|
3251
|
-
|
|
4201
|
+
// (25:1) {#each customFields as customField, i}
|
|
4202
|
+
function create_each_block(ctx) {
|
|
4203
|
+
var if_block_anchor;
|
|
4204
|
+
var if_block = /*customField*/ ctx[5].hidden !== true && create_if_block$2(ctx);
|
|
4205
|
+
return {
|
|
4206
|
+
c: function () {
|
|
4207
|
+
if (if_block)
|
|
4208
|
+
if_block.c();
|
|
4209
|
+
if_block_anchor = empty();
|
|
4210
|
+
},
|
|
4211
|
+
m: function (target, anchor) {
|
|
4212
|
+
if (if_block)
|
|
4213
|
+
if_block.m(target, anchor);
|
|
4214
|
+
insert(target, if_block_anchor, anchor);
|
|
4215
|
+
},
|
|
4216
|
+
p: function (ctx, dirty) {
|
|
4217
|
+
if ( /*customField*/ctx[5].hidden !== true) {
|
|
4218
|
+
if (if_block) {
|
|
4219
|
+
if_block.p(ctx, dirty);
|
|
4220
|
+
}
|
|
4221
|
+
else {
|
|
4222
|
+
if_block = create_if_block$2(ctx);
|
|
4223
|
+
if_block.c();
|
|
4224
|
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
4225
|
+
}
|
|
4226
|
+
}
|
|
4227
|
+
else if (if_block) {
|
|
4228
|
+
if_block.d(1);
|
|
4229
|
+
if_block = null;
|
|
4230
|
+
}
|
|
4231
|
+
},
|
|
4232
|
+
d: function (detaching) {
|
|
4233
|
+
if (if_block)
|
|
4234
|
+
if_block.d(detaching);
|
|
4235
|
+
if (detaching)
|
|
4236
|
+
detach(if_block_anchor);
|
|
4237
|
+
}
|
|
4238
|
+
};
|
|
4239
|
+
}
|
|
4240
|
+
function create_fragment$6(ctx) {
|
|
3252
4241
|
var div1;
|
|
3253
|
-
var
|
|
4242
|
+
var h2;
|
|
4243
|
+
var t1;
|
|
4244
|
+
var div0;
|
|
4245
|
+
var button;
|
|
4246
|
+
var t3;
|
|
3254
4247
|
var form;
|
|
3255
4248
|
var mounted;
|
|
3256
4249
|
var dispose;
|
|
3257
|
-
var each_value = /*customFields*/ ctx[
|
|
4250
|
+
var each_value = /*customFields*/ ctx[1];
|
|
3258
4251
|
var each_blocks = [];
|
|
3259
4252
|
for (var i = 0; i < each_value.length; i += 1) {
|
|
3260
4253
|
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
@@ -3262,12 +4255,20 @@ function create_fragment$5(ctx) {
|
|
|
3262
4255
|
return {
|
|
3263
4256
|
c: function () {
|
|
3264
4257
|
div1 = element("div");
|
|
3265
|
-
|
|
3266
|
-
|
|
4258
|
+
h2 = element("h2");
|
|
4259
|
+
h2.textContent = "Profile Information";
|
|
4260
|
+
t1 = space();
|
|
4261
|
+
div0 = element("div");
|
|
4262
|
+
button = element("button");
|
|
4263
|
+
button.textContent = "Save";
|
|
4264
|
+
t3 = space();
|
|
3267
4265
|
form = element("form");
|
|
3268
4266
|
for (var i = 0; i < each_blocks.length; i += 1) {
|
|
3269
4267
|
each_blocks[i].c();
|
|
3270
4268
|
}
|
|
4269
|
+
attr(h2, "class", "ms-modal__title ms-modal__title--profile");
|
|
4270
|
+
attr(button, "class", "ms-modal__save-button");
|
|
4271
|
+
attr(div0, "class", "ms-modal__action-container");
|
|
3271
4272
|
attr(div1, "class", "ms-modal__title-container");
|
|
3272
4273
|
attr(form, "class", "ms-form");
|
|
3273
4274
|
attr(form, "action", "");
|
|
@@ -3276,20 +4277,27 @@ function create_fragment$5(ctx) {
|
|
|
3276
4277
|
},
|
|
3277
4278
|
m: function (target, anchor) {
|
|
3278
4279
|
insert(target, div1, anchor);
|
|
3279
|
-
|
|
4280
|
+
append(div1, h2);
|
|
4281
|
+
append(div1, t1);
|
|
4282
|
+
append(div1, div0);
|
|
4283
|
+
append(div0, button);
|
|
4284
|
+
insert(target, t3, anchor);
|
|
3280
4285
|
insert(target, form, anchor);
|
|
3281
4286
|
for (var i = 0; i < each_blocks.length; i += 1) {
|
|
3282
4287
|
each_blocks[i].m(form, null);
|
|
3283
4288
|
}
|
|
3284
4289
|
if (!mounted) {
|
|
3285
|
-
dispose =
|
|
4290
|
+
dispose = [
|
|
4291
|
+
listen(button, "click", /*saveProfile*/ ctx[2]),
|
|
4292
|
+
listen(form, "submit", stop_propagation(prevent_default(/*saveProfile*/ ctx[2])))
|
|
4293
|
+
];
|
|
3286
4294
|
mounted = true;
|
|
3287
4295
|
}
|
|
3288
4296
|
},
|
|
3289
4297
|
p: function (ctx, _a) {
|
|
3290
4298
|
var _b = __read(_a, 1), dirty = _b[0];
|
|
3291
|
-
if (dirty & /*customFields*/
|
|
3292
|
-
each_value = /*customFields*/ ctx[
|
|
4299
|
+
if (dirty & /*customFields, member*/ 3) {
|
|
4300
|
+
each_value = /*customFields*/ ctx[1];
|
|
3293
4301
|
var i = void 0;
|
|
3294
4302
|
for (i = 0; i < each_value.length; i += 1) {
|
|
3295
4303
|
var child_ctx = get_each_context(ctx, each_value, i);
|
|
@@ -3314,65 +4322,63 @@ function create_fragment$5(ctx) {
|
|
|
3314
4322
|
if (detaching)
|
|
3315
4323
|
detach(div1);
|
|
3316
4324
|
if (detaching)
|
|
3317
|
-
detach(
|
|
4325
|
+
detach(t3);
|
|
3318
4326
|
if (detaching)
|
|
3319
4327
|
detach(form);
|
|
3320
4328
|
destroy_each(each_blocks, detaching);
|
|
3321
4329
|
mounted = false;
|
|
3322
|
-
dispose
|
|
4330
|
+
run_all(dispose);
|
|
3323
4331
|
}
|
|
3324
4332
|
};
|
|
3325
4333
|
}
|
|
3326
|
-
function
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
return __generator(this, function (_a) {
|
|
3344
|
-
console.log(e);
|
|
3345
|
-
return [2 /*return*/];
|
|
4334
|
+
function instance$4($$self, $$props, $$invalidate) {
|
|
4335
|
+
var customFields = $$props.customFields;
|
|
4336
|
+
var member = $$props.member;
|
|
4337
|
+
var profileLoader = $$props.profileLoader;
|
|
4338
|
+
function saveProfile(e) {
|
|
4339
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4340
|
+
return __generator(this, function (_a) {
|
|
4341
|
+
switch (_a.label) {
|
|
4342
|
+
case 0:
|
|
4343
|
+
$$invalidate(3, profileLoader = true);
|
|
4344
|
+
return [4 /*yield*/, window.$memberstackDom.updateMember({ customFields: member.customFields })];
|
|
4345
|
+
case 1:
|
|
4346
|
+
_a.sent();
|
|
4347
|
+
$$invalidate(3, profileLoader = false);
|
|
4348
|
+
return [2 /*return*/];
|
|
4349
|
+
}
|
|
4350
|
+
});
|
|
3346
4351
|
});
|
|
3347
|
-
}
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
];
|
|
3362
|
-
getMember();
|
|
3363
|
-
return [customFields];
|
|
4352
|
+
}
|
|
4353
|
+
function input_input_handler(customField) {
|
|
4354
|
+
member.customFields[customField.key] = this.value;
|
|
4355
|
+
$$invalidate(0, member);
|
|
4356
|
+
}
|
|
4357
|
+
$$self.$$set = function ($$props) {
|
|
4358
|
+
if ('customFields' in $$props)
|
|
4359
|
+
$$invalidate(1, customFields = $$props.customFields);
|
|
4360
|
+
if ('member' in $$props)
|
|
4361
|
+
$$invalidate(0, member = $$props.member);
|
|
4362
|
+
if ('profileLoader' in $$props)
|
|
4363
|
+
$$invalidate(3, profileLoader = $$props.profileLoader);
|
|
4364
|
+
};
|
|
4365
|
+
return [member, customFields, saveProfile, profileLoader, input_input_handler];
|
|
3364
4366
|
}
|
|
3365
|
-
var
|
|
3366
|
-
__extends(
|
|
3367
|
-
function
|
|
4367
|
+
var ProfileInfoContent = /** @class */ (function (_super) {
|
|
4368
|
+
__extends(ProfileInfoContent, _super);
|
|
4369
|
+
function ProfileInfoContent(options) {
|
|
3368
4370
|
var _this = _super.call(this) || this;
|
|
3369
|
-
init(_this, options, instance$4, create_fragment$
|
|
4371
|
+
init(_this, options, instance$4, create_fragment$6, safe_not_equal, {
|
|
4372
|
+
customFields: 1,
|
|
4373
|
+
member: 0,
|
|
4374
|
+
profileLoader: 3
|
|
4375
|
+
});
|
|
3370
4376
|
return _this;
|
|
3371
4377
|
}
|
|
3372
|
-
return
|
|
4378
|
+
return ProfileInfoContent;
|
|
3373
4379
|
}(SvelteComponent));
|
|
3374
4380
|
/* src/icons/PasswordLockIcon.svelte generated by Svelte v3.48.0 */
|
|
3375
|
-
function create_fragment$
|
|
4381
|
+
function create_fragment$5(ctx) {
|
|
3376
4382
|
var svg;
|
|
3377
4383
|
var path;
|
|
3378
4384
|
return {
|
|
@@ -3402,42 +4408,74 @@ var PasswordLockIcon = /** @class */ (function (_super) {
|
|
|
3402
4408
|
__extends(PasswordLockIcon, _super);
|
|
3403
4409
|
function PasswordLockIcon(options) {
|
|
3404
4410
|
var _this = _super.call(this) || this;
|
|
3405
|
-
init(_this, options, null, create_fragment$
|
|
4411
|
+
init(_this, options, null, create_fragment$5, safe_not_equal, {});
|
|
3406
4412
|
return _this;
|
|
3407
4413
|
}
|
|
3408
4414
|
return PasswordLockIcon;
|
|
3409
4415
|
}(SvelteComponent));
|
|
3410
4416
|
/* src/components/SecurityInfoContent.svelte generated by Svelte v3.48.0 */
|
|
3411
|
-
function create_fragment$
|
|
4417
|
+
function create_fragment$4(ctx) {
|
|
3412
4418
|
var div1;
|
|
3413
|
-
var
|
|
4419
|
+
var h2;
|
|
4420
|
+
var t1;
|
|
4421
|
+
var div0;
|
|
4422
|
+
var button0;
|
|
4423
|
+
var t2;
|
|
4424
|
+
var button0_disabled_value;
|
|
4425
|
+
var t3;
|
|
3414
4426
|
var form;
|
|
3415
4427
|
var emailinput;
|
|
3416
|
-
var
|
|
4428
|
+
var updating_emailInputValid;
|
|
4429
|
+
var updating_emailValue;
|
|
4430
|
+
var t4;
|
|
3417
4431
|
var label;
|
|
3418
|
-
var
|
|
3419
|
-
var
|
|
4432
|
+
var t6;
|
|
4433
|
+
var button1;
|
|
3420
4434
|
var passwordlockicon;
|
|
3421
|
-
var
|
|
4435
|
+
var t7;
|
|
3422
4436
|
var current;
|
|
3423
4437
|
var mounted;
|
|
3424
4438
|
var dispose;
|
|
3425
|
-
|
|
4439
|
+
function emailinput_emailInputValid_binding(value) {
|
|
4440
|
+
/*emailinput_emailInputValid_binding*/ ctx[5](value);
|
|
4441
|
+
}
|
|
4442
|
+
function emailinput_emailValue_binding(value) {
|
|
4443
|
+
/*emailinput_emailValue_binding*/ ctx[6](value);
|
|
4444
|
+
}
|
|
4445
|
+
var emailinput_props = {};
|
|
4446
|
+
if ( /*emailInputValid*/ctx[2] !== void 0) {
|
|
4447
|
+
emailinput_props.emailInputValid = /*emailInputValid*/ ctx[2];
|
|
4448
|
+
}
|
|
4449
|
+
if ( /*emailValue*/ctx[1] !== void 0) {
|
|
4450
|
+
emailinput_props.emailValue = /*emailValue*/ ctx[1];
|
|
4451
|
+
}
|
|
4452
|
+
emailinput = new EmailInput({ props: emailinput_props });
|
|
4453
|
+
binding_callbacks.push(function () { return bind(emailinput, 'emailInputValid', emailinput_emailInputValid_binding); });
|
|
4454
|
+
binding_callbacks.push(function () { return bind(emailinput, 'emailValue', emailinput_emailValue_binding); });
|
|
3426
4455
|
passwordlockicon = new PasswordLockIcon({});
|
|
3427
4456
|
return {
|
|
3428
4457
|
c: function () {
|
|
3429
4458
|
div1 = element("div");
|
|
3430
|
-
|
|
3431
|
-
|
|
4459
|
+
h2 = element("h2");
|
|
4460
|
+
h2.textContent = "Security";
|
|
4461
|
+
t1 = space();
|
|
4462
|
+
div0 = element("div");
|
|
4463
|
+
button0 = element("button");
|
|
4464
|
+
t2 = text("Save");
|
|
4465
|
+
t3 = space();
|
|
3432
4466
|
form = element("form");
|
|
3433
4467
|
create_component(emailinput.$$.fragment);
|
|
3434
|
-
|
|
4468
|
+
t4 = space();
|
|
3435
4469
|
label = element("label");
|
|
3436
4470
|
label.textContent = "Password";
|
|
3437
|
-
|
|
3438
|
-
|
|
4471
|
+
t6 = space();
|
|
4472
|
+
button1 = element("button");
|
|
3439
4473
|
create_component(passwordlockicon.$$.fragment);
|
|
3440
|
-
|
|
4474
|
+
t7 = text(" Set Password");
|
|
4475
|
+
attr(h2, "class", "ms-modal__title ms-modal__title--profile");
|
|
4476
|
+
attr(button0, "class", "ms-modal__save-button");
|
|
4477
|
+
button0.disabled = button0_disabled_value = !ctx[2];
|
|
4478
|
+
attr(div0, "class", "ms-modal__action-container");
|
|
3441
4479
|
attr(div1, "class", "ms-modal__title-container");
|
|
3442
4480
|
attr(form, "class", "ms-form");
|
|
3443
4481
|
attr(form, "action", "");
|
|
@@ -3445,30 +4483,53 @@ function create_fragment$3(ctx) {
|
|
|
3445
4483
|
attr(form, "autocomplete", "off");
|
|
3446
4484
|
attr(label, "class", "ms-modal__button-label");
|
|
3447
4485
|
attr(label, "for", "setPassword");
|
|
3448
|
-
attr(
|
|
3449
|
-
attr(
|
|
4486
|
+
attr(button1, "class", "ms-modal__outline-button");
|
|
4487
|
+
attr(button1, "name", "setPassword");
|
|
3450
4488
|
},
|
|
3451
4489
|
m: function (target, anchor) {
|
|
3452
4490
|
insert(target, div1, anchor);
|
|
3453
|
-
|
|
4491
|
+
append(div1, h2);
|
|
4492
|
+
append(div1, t1);
|
|
4493
|
+
append(div1, div0);
|
|
4494
|
+
append(div0, button0);
|
|
4495
|
+
append(button0, t2);
|
|
4496
|
+
insert(target, t3, anchor);
|
|
3454
4497
|
insert(target, form, anchor);
|
|
3455
4498
|
mount_component(emailinput, form, null);
|
|
3456
|
-
insert(target,
|
|
4499
|
+
insert(target, t4, anchor);
|
|
3457
4500
|
insert(target, label, anchor);
|
|
3458
|
-
insert(target,
|
|
3459
|
-
insert(target,
|
|
3460
|
-
mount_component(passwordlockicon,
|
|
3461
|
-
append(
|
|
4501
|
+
insert(target, t6, anchor);
|
|
4502
|
+
insert(target, button1, anchor);
|
|
4503
|
+
mount_component(passwordlockicon, button1, null);
|
|
4504
|
+
append(button1, t7);
|
|
3462
4505
|
current = true;
|
|
3463
4506
|
if (!mounted) {
|
|
3464
4507
|
dispose = [
|
|
3465
|
-
listen(
|
|
3466
|
-
listen(
|
|
4508
|
+
listen(button0, "click", /*submitEmailChange*/ ctx[3]),
|
|
4509
|
+
listen(form, "submit", stop_propagation(prevent_default(/*submitEmailChange*/ ctx[3]))),
|
|
4510
|
+
listen(button1, "click", /*click_handler*/ ctx[7])
|
|
3467
4511
|
];
|
|
3468
4512
|
mounted = true;
|
|
3469
4513
|
}
|
|
3470
4514
|
},
|
|
3471
|
-
p:
|
|
4515
|
+
p: function (ctx, _a) {
|
|
4516
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
4517
|
+
if (!current || dirty & /*emailInputValid*/ 4 && button0_disabled_value !== (button0_disabled_value = !ctx[2])) {
|
|
4518
|
+
button0.disabled = button0_disabled_value;
|
|
4519
|
+
}
|
|
4520
|
+
var emailinput_changes = {};
|
|
4521
|
+
if (!updating_emailInputValid && dirty & /*emailInputValid*/ 4) {
|
|
4522
|
+
updating_emailInputValid = true;
|
|
4523
|
+
emailinput_changes.emailInputValid = /*emailInputValid*/ ctx[2];
|
|
4524
|
+
add_flush_callback(function () { return updating_emailInputValid = false; });
|
|
4525
|
+
}
|
|
4526
|
+
if (!updating_emailValue && dirty & /*emailValue*/ 2) {
|
|
4527
|
+
updating_emailValue = true;
|
|
4528
|
+
emailinput_changes.emailValue = /*emailValue*/ ctx[1];
|
|
4529
|
+
add_flush_callback(function () { return updating_emailValue = false; });
|
|
4530
|
+
}
|
|
4531
|
+
emailinput.$set(emailinput_changes);
|
|
4532
|
+
},
|
|
3472
4533
|
i: function (local) {
|
|
3473
4534
|
if (current)
|
|
3474
4535
|
return;
|
|
@@ -3485,52 +4546,100 @@ function create_fragment$3(ctx) {
|
|
|
3485
4546
|
if (detaching)
|
|
3486
4547
|
detach(div1);
|
|
3487
4548
|
if (detaching)
|
|
3488
|
-
detach(
|
|
4549
|
+
detach(t3);
|
|
3489
4550
|
if (detaching)
|
|
3490
4551
|
detach(form);
|
|
3491
4552
|
destroy_component(emailinput);
|
|
3492
4553
|
if (detaching)
|
|
3493
|
-
detach(
|
|
4554
|
+
detach(t4);
|
|
3494
4555
|
if (detaching)
|
|
3495
4556
|
detach(label);
|
|
3496
4557
|
if (detaching)
|
|
3497
|
-
detach(
|
|
4558
|
+
detach(t6);
|
|
3498
4559
|
if (detaching)
|
|
3499
|
-
detach(
|
|
4560
|
+
detach(button1);
|
|
3500
4561
|
destroy_component(passwordlockicon);
|
|
3501
4562
|
mounted = false;
|
|
3502
4563
|
run_all(dispose);
|
|
3503
4564
|
}
|
|
3504
4565
|
};
|
|
3505
4566
|
}
|
|
3506
|
-
function submitEmailChange(e) {
|
|
3507
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3508
|
-
return __generator(this, function (_a) {
|
|
3509
|
-
console.log(e);
|
|
3510
|
-
return [2 /*return*/];
|
|
3511
|
-
});
|
|
3512
|
-
});
|
|
3513
|
-
}
|
|
3514
4567
|
function instance$3($$self, $$props, $$invalidate) {
|
|
3515
4568
|
var displayProfile = $$props.displayProfile;
|
|
4569
|
+
var emailValue = $$props.emailValue;
|
|
4570
|
+
var profileLoader = $$props.profileLoader;
|
|
4571
|
+
var emailInputValid = false;
|
|
4572
|
+
function submitEmailChange(e) {
|
|
4573
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4574
|
+
var err_6;
|
|
4575
|
+
return __generator(this, function (_a) {
|
|
4576
|
+
switch (_a.label) {
|
|
4577
|
+
case 0:
|
|
4578
|
+
if (!emailInputValid || !emailValue)
|
|
4579
|
+
return [2 /*return*/];
|
|
4580
|
+
$$invalidate(4, profileLoader = true);
|
|
4581
|
+
_a.label = 1;
|
|
4582
|
+
case 1:
|
|
4583
|
+
_a.trys.push([1, 3, , 4]);
|
|
4584
|
+
return [4 /*yield*/, window.$memberstackDom.updateMemberAuth({ email: emailValue })];
|
|
4585
|
+
case 2:
|
|
4586
|
+
_a.sent();
|
|
4587
|
+
window.$memberstackDom._showMessage("Email successfully changed", false);
|
|
4588
|
+
$$invalidate(4, profileLoader = false);
|
|
4589
|
+
return [3 /*break*/, 4];
|
|
4590
|
+
case 3:
|
|
4591
|
+
err_6 = _a.sent();
|
|
4592
|
+
window.$memberstackDom._showMessage(err_6.message, true);
|
|
4593
|
+
$$invalidate(4, profileLoader = false);
|
|
4594
|
+
return [3 /*break*/, 4];
|
|
4595
|
+
case 4: return [2 /*return*/];
|
|
4596
|
+
}
|
|
4597
|
+
});
|
|
4598
|
+
});
|
|
4599
|
+
}
|
|
4600
|
+
function emailinput_emailInputValid_binding(value) {
|
|
4601
|
+
emailInputValid = value;
|
|
4602
|
+
$$invalidate(2, emailInputValid);
|
|
4603
|
+
}
|
|
4604
|
+
function emailinput_emailValue_binding(value) {
|
|
4605
|
+
emailValue = value;
|
|
4606
|
+
$$invalidate(1, emailValue);
|
|
4607
|
+
}
|
|
3516
4608
|
var click_handler = function () { return $$invalidate(0, displayProfile = "changePassword"); };
|
|
3517
4609
|
$$self.$$set = function ($$props) {
|
|
3518
4610
|
if ('displayProfile' in $$props)
|
|
3519
4611
|
$$invalidate(0, displayProfile = $$props.displayProfile);
|
|
4612
|
+
if ('emailValue' in $$props)
|
|
4613
|
+
$$invalidate(1, emailValue = $$props.emailValue);
|
|
4614
|
+
if ('profileLoader' in $$props)
|
|
4615
|
+
$$invalidate(4, profileLoader = $$props.profileLoader);
|
|
3520
4616
|
};
|
|
3521
|
-
return [
|
|
4617
|
+
return [
|
|
4618
|
+
displayProfile,
|
|
4619
|
+
emailValue,
|
|
4620
|
+
emailInputValid,
|
|
4621
|
+
submitEmailChange,
|
|
4622
|
+
profileLoader,
|
|
4623
|
+
emailinput_emailInputValid_binding,
|
|
4624
|
+
emailinput_emailValue_binding,
|
|
4625
|
+
click_handler
|
|
4626
|
+
];
|
|
3522
4627
|
}
|
|
3523
4628
|
var SecurityInfoContent = /** @class */ (function (_super) {
|
|
3524
4629
|
__extends(SecurityInfoContent, _super);
|
|
3525
4630
|
function SecurityInfoContent(options) {
|
|
3526
4631
|
var _this = _super.call(this) || this;
|
|
3527
|
-
init(_this, options, instance$3, create_fragment$
|
|
4632
|
+
init(_this, options, instance$3, create_fragment$4, safe_not_equal, {
|
|
4633
|
+
displayProfile: 0,
|
|
4634
|
+
emailValue: 1,
|
|
4635
|
+
profileLoader: 4
|
|
4636
|
+
});
|
|
3528
4637
|
return _this;
|
|
3529
4638
|
}
|
|
3530
4639
|
return SecurityInfoContent;
|
|
3531
4640
|
}(SvelteComponent));
|
|
3532
4641
|
/* src/components/PasswordInfoContent.svelte generated by Svelte v3.48.0 */
|
|
3533
|
-
function create_fragment$
|
|
4642
|
+
function create_fragment$3(ctx) {
|
|
3534
4643
|
var div3;
|
|
3535
4644
|
var div1;
|
|
3536
4645
|
var div0;
|
|
@@ -3540,35 +4649,83 @@ function create_fragment$2(ctx) {
|
|
|
3540
4649
|
var h2;
|
|
3541
4650
|
var t2;
|
|
3542
4651
|
var div2;
|
|
3543
|
-
var
|
|
4652
|
+
var button1;
|
|
4653
|
+
var t3;
|
|
4654
|
+
var button1_disabled_value;
|
|
4655
|
+
var t4;
|
|
3544
4656
|
var form;
|
|
3545
4657
|
var passwordinput0;
|
|
3546
|
-
var
|
|
4658
|
+
var updating_passwordValue;
|
|
4659
|
+
var updating_passwordInputValid;
|
|
4660
|
+
var t5;
|
|
3547
4661
|
var passwordinput1;
|
|
3548
|
-
var
|
|
4662
|
+
var updating_passwordValue_1;
|
|
4663
|
+
var updating_passwordInputValid_1;
|
|
4664
|
+
var t6;
|
|
3549
4665
|
var passwordinput2;
|
|
4666
|
+
var updating_passwordValue_2;
|
|
4667
|
+
var updating_passwordInputValid_2;
|
|
3550
4668
|
var current;
|
|
3551
4669
|
var mounted;
|
|
3552
4670
|
var dispose;
|
|
3553
4671
|
backicon = new BackIcon({});
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
}
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
});
|
|
4672
|
+
function passwordinput0_passwordValue_binding(value) {
|
|
4673
|
+
/*passwordinput0_passwordValue_binding*/ ctx[10](value);
|
|
4674
|
+
}
|
|
4675
|
+
function passwordinput0_passwordInputValid_binding(value) {
|
|
4676
|
+
/*passwordinput0_passwordInputValid_binding*/ ctx[11](value);
|
|
4677
|
+
}
|
|
4678
|
+
var passwordinput0_props = {
|
|
4679
|
+
passwordLabel: "Current Password",
|
|
4680
|
+
passwordPlaceholder: "Enter a strong password"
|
|
4681
|
+
};
|
|
4682
|
+
if ( /*currentPasswordValue*/ctx[1] !== void 0) {
|
|
4683
|
+
passwordinput0_props.passwordValue = /*currentPasswordValue*/ ctx[1];
|
|
4684
|
+
}
|
|
4685
|
+
if ( /*currentPasswordValid*/ctx[4] !== void 0) {
|
|
4686
|
+
passwordinput0_props.passwordInputValid = /*currentPasswordValid*/ ctx[4];
|
|
4687
|
+
}
|
|
4688
|
+
passwordinput0 = new PasswordInput({ props: passwordinput0_props });
|
|
4689
|
+
binding_callbacks.push(function () { return bind(passwordinput0, 'passwordValue', passwordinput0_passwordValue_binding); });
|
|
4690
|
+
binding_callbacks.push(function () { return bind(passwordinput0, 'passwordInputValid', passwordinput0_passwordInputValid_binding); });
|
|
4691
|
+
function passwordinput1_passwordValue_binding(value) {
|
|
4692
|
+
/*passwordinput1_passwordValue_binding*/ ctx[12](value);
|
|
4693
|
+
}
|
|
4694
|
+
function passwordinput1_passwordInputValid_binding(value) {
|
|
4695
|
+
/*passwordinput1_passwordInputValid_binding*/ ctx[13](value);
|
|
4696
|
+
}
|
|
4697
|
+
var passwordinput1_props = {
|
|
4698
|
+
passwordLabel: "New Password",
|
|
4699
|
+
passwordPlaceholder: "Enter a strong password"
|
|
4700
|
+
};
|
|
4701
|
+
if ( /*newPasswordValue*/ctx[2] !== void 0) {
|
|
4702
|
+
passwordinput1_props.passwordValue = /*newPasswordValue*/ ctx[2];
|
|
4703
|
+
}
|
|
4704
|
+
if ( /*newPasswordValid*/ctx[5] !== void 0) {
|
|
4705
|
+
passwordinput1_props.passwordInputValid = /*newPasswordValid*/ ctx[5];
|
|
4706
|
+
}
|
|
4707
|
+
passwordinput1 = new PasswordInput({ props: passwordinput1_props });
|
|
4708
|
+
binding_callbacks.push(function () { return bind(passwordinput1, 'passwordValue', passwordinput1_passwordValue_binding); });
|
|
4709
|
+
binding_callbacks.push(function () { return bind(passwordinput1, 'passwordInputValid', passwordinput1_passwordInputValid_binding); });
|
|
4710
|
+
function passwordinput2_passwordValue_binding(value) {
|
|
4711
|
+
/*passwordinput2_passwordValue_binding*/ ctx[14](value);
|
|
4712
|
+
}
|
|
4713
|
+
function passwordinput2_passwordInputValid_binding(value) {
|
|
4714
|
+
/*passwordinput2_passwordInputValid_binding*/ ctx[15](value);
|
|
4715
|
+
}
|
|
4716
|
+
var passwordinput2_props = {
|
|
4717
|
+
passwordLabel: "Confirm New Password",
|
|
4718
|
+
passwordPlaceholder: "Enter a strong password"
|
|
4719
|
+
};
|
|
4720
|
+
if ( /*confirmPasswordValue*/ctx[3] !== void 0) {
|
|
4721
|
+
passwordinput2_props.passwordValue = /*confirmPasswordValue*/ ctx[3];
|
|
4722
|
+
}
|
|
4723
|
+
if ( /*confirmPasswordValid*/ctx[6] !== void 0) {
|
|
4724
|
+
passwordinput2_props.passwordInputValid = /*confirmPasswordValid*/ ctx[6];
|
|
4725
|
+
}
|
|
4726
|
+
passwordinput2 = new PasswordInput({ props: passwordinput2_props });
|
|
4727
|
+
binding_callbacks.push(function () { return bind(passwordinput2, 'passwordValue', passwordinput2_passwordValue_binding); });
|
|
4728
|
+
binding_callbacks.push(function () { return bind(passwordinput2, 'passwordInputValid', passwordinput2_passwordInputValid_binding); });
|
|
3572
4729
|
return {
|
|
3573
4730
|
c: function () {
|
|
3574
4731
|
div3 = element("div");
|
|
@@ -3581,17 +4738,20 @@ function create_fragment$2(ctx) {
|
|
|
3581
4738
|
h2.textContent = "Change Password";
|
|
3582
4739
|
t2 = space();
|
|
3583
4740
|
div2 = element("div");
|
|
3584
|
-
|
|
3585
|
-
|
|
4741
|
+
button1 = element("button");
|
|
4742
|
+
t3 = text("Save");
|
|
4743
|
+
t4 = space();
|
|
3586
4744
|
form = element("form");
|
|
3587
4745
|
create_component(passwordinput0.$$.fragment);
|
|
3588
|
-
|
|
4746
|
+
t5 = space();
|
|
3589
4747
|
create_component(passwordinput1.$$.fragment);
|
|
3590
|
-
|
|
4748
|
+
t6 = space();
|
|
3591
4749
|
create_component(passwordinput2.$$.fragment);
|
|
3592
4750
|
attr(div0, "class", "ms-modal__profile-back");
|
|
3593
4751
|
attr(h2, "class", "ms-modal__title ms-modal__title--profile");
|
|
3594
4752
|
attr(div1, "class", "ms-modal__title-group");
|
|
4753
|
+
attr(button1, "class", "ms-modal__save-button");
|
|
4754
|
+
button1.disabled = button1_disabled_value = !ctx[4] || !ctx[5] || !ctx[6];
|
|
3595
4755
|
attr(div2, "class", "ms-modal__action-container");
|
|
3596
4756
|
attr(div3, "class", "ms-modal__title-container");
|
|
3597
4757
|
attr(form, "class", "ms-form");
|
|
@@ -3609,23 +4769,67 @@ function create_fragment$2(ctx) {
|
|
|
3609
4769
|
append(div1, h2);
|
|
3610
4770
|
append(div3, t2);
|
|
3611
4771
|
append(div3, div2);
|
|
3612
|
-
|
|
4772
|
+
append(div2, button1);
|
|
4773
|
+
append(button1, t3);
|
|
4774
|
+
insert(target, t4, anchor);
|
|
3613
4775
|
insert(target, form, anchor);
|
|
3614
4776
|
mount_component(passwordinput0, form, null);
|
|
3615
|
-
append(form,
|
|
4777
|
+
append(form, t5);
|
|
3616
4778
|
mount_component(passwordinput1, form, null);
|
|
3617
|
-
append(form,
|
|
4779
|
+
append(form, t6);
|
|
3618
4780
|
mount_component(passwordinput2, form, null);
|
|
3619
4781
|
current = true;
|
|
3620
4782
|
if (!mounted) {
|
|
3621
4783
|
dispose = [
|
|
3622
|
-
listen(button0, "click", /*click_handler*/ ctx[
|
|
3623
|
-
listen(
|
|
4784
|
+
listen(button0, "click", /*click_handler*/ ctx[9]),
|
|
4785
|
+
listen(button1, "click", /*submitPasswordChange*/ ctx[7]),
|
|
4786
|
+
listen(form, "submit", stop_propagation(prevent_default(/*submitPasswordChange*/ ctx[7])))
|
|
3624
4787
|
];
|
|
3625
4788
|
mounted = true;
|
|
3626
4789
|
}
|
|
3627
4790
|
},
|
|
3628
|
-
p:
|
|
4791
|
+
p: function (ctx, _a) {
|
|
4792
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
4793
|
+
if (!current || dirty & /*currentPasswordValid, newPasswordValid, confirmPasswordValid*/ 112 && button1_disabled_value !== (button1_disabled_value = !ctx[4] || !ctx[5] || !ctx[6])) {
|
|
4794
|
+
button1.disabled = button1_disabled_value;
|
|
4795
|
+
}
|
|
4796
|
+
var passwordinput0_changes = {};
|
|
4797
|
+
if (!updating_passwordValue && dirty & /*currentPasswordValue*/ 2) {
|
|
4798
|
+
updating_passwordValue = true;
|
|
4799
|
+
passwordinput0_changes.passwordValue = /*currentPasswordValue*/ ctx[1];
|
|
4800
|
+
add_flush_callback(function () { return updating_passwordValue = false; });
|
|
4801
|
+
}
|
|
4802
|
+
if (!updating_passwordInputValid && dirty & /*currentPasswordValid*/ 16) {
|
|
4803
|
+
updating_passwordInputValid = true;
|
|
4804
|
+
passwordinput0_changes.passwordInputValid = /*currentPasswordValid*/ ctx[4];
|
|
4805
|
+
add_flush_callback(function () { return updating_passwordInputValid = false; });
|
|
4806
|
+
}
|
|
4807
|
+
passwordinput0.$set(passwordinput0_changes);
|
|
4808
|
+
var passwordinput1_changes = {};
|
|
4809
|
+
if (!updating_passwordValue_1 && dirty & /*newPasswordValue*/ 4) {
|
|
4810
|
+
updating_passwordValue_1 = true;
|
|
4811
|
+
passwordinput1_changes.passwordValue = /*newPasswordValue*/ ctx[2];
|
|
4812
|
+
add_flush_callback(function () { return updating_passwordValue_1 = false; });
|
|
4813
|
+
}
|
|
4814
|
+
if (!updating_passwordInputValid_1 && dirty & /*newPasswordValid*/ 32) {
|
|
4815
|
+
updating_passwordInputValid_1 = true;
|
|
4816
|
+
passwordinput1_changes.passwordInputValid = /*newPasswordValid*/ ctx[5];
|
|
4817
|
+
add_flush_callback(function () { return updating_passwordInputValid_1 = false; });
|
|
4818
|
+
}
|
|
4819
|
+
passwordinput1.$set(passwordinput1_changes);
|
|
4820
|
+
var passwordinput2_changes = {};
|
|
4821
|
+
if (!updating_passwordValue_2 && dirty & /*confirmPasswordValue*/ 8) {
|
|
4822
|
+
updating_passwordValue_2 = true;
|
|
4823
|
+
passwordinput2_changes.passwordValue = /*confirmPasswordValue*/ ctx[3];
|
|
4824
|
+
add_flush_callback(function () { return updating_passwordValue_2 = false; });
|
|
4825
|
+
}
|
|
4826
|
+
if (!updating_passwordInputValid_2 && dirty & /*confirmPasswordValid*/ 64) {
|
|
4827
|
+
updating_passwordInputValid_2 = true;
|
|
4828
|
+
passwordinput2_changes.passwordInputValid = /*confirmPasswordValid*/ ctx[6];
|
|
4829
|
+
add_flush_callback(function () { return updating_passwordInputValid_2 = false; });
|
|
4830
|
+
}
|
|
4831
|
+
passwordinput2.$set(passwordinput2_changes);
|
|
4832
|
+
},
|
|
3629
4833
|
i: function (local) {
|
|
3630
4834
|
if (current)
|
|
3631
4835
|
return;
|
|
@@ -3647,7 +4851,7 @@ function create_fragment$2(ctx) {
|
|
|
3647
4851
|
detach(div3);
|
|
3648
4852
|
destroy_component(backicon);
|
|
3649
4853
|
if (detaching)
|
|
3650
|
-
detach(
|
|
4854
|
+
detach(t4);
|
|
3651
4855
|
if (detaching)
|
|
3652
4856
|
detach(form);
|
|
3653
4857
|
destroy_component(passwordinput0);
|
|
@@ -3658,46 +4862,287 @@ function create_fragment$2(ctx) {
|
|
|
3658
4862
|
}
|
|
3659
4863
|
};
|
|
3660
4864
|
}
|
|
3661
|
-
function submitPasswordChange(e) {
|
|
3662
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3663
|
-
return __generator(this, function (_a) {
|
|
3664
|
-
console.log(e);
|
|
3665
|
-
return [2 /*return*/];
|
|
3666
|
-
});
|
|
3667
|
-
});
|
|
3668
|
-
}
|
|
3669
4865
|
function instance$2($$self, $$props, $$invalidate) {
|
|
3670
4866
|
var displayProfile = $$props.displayProfile;
|
|
4867
|
+
var profileLoader = $$props.profileLoader;
|
|
4868
|
+
var currentPasswordValue = "";
|
|
4869
|
+
var newPasswordValue = "";
|
|
4870
|
+
var confirmPasswordValue = "";
|
|
4871
|
+
var currentPasswordValid = false;
|
|
4872
|
+
var newPasswordValid = false;
|
|
4873
|
+
var confirmPasswordValid = false;
|
|
4874
|
+
function submitPasswordChange(e) {
|
|
4875
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4876
|
+
var data, err_7;
|
|
4877
|
+
return __generator(this, function (_a) {
|
|
4878
|
+
switch (_a.label) {
|
|
4879
|
+
case 0:
|
|
4880
|
+
if (!currentPasswordValid && !newPasswordValid && !confirmPasswordValid)
|
|
4881
|
+
return [2 /*return*/];
|
|
4882
|
+
if (newPasswordValue !== confirmPasswordValue) {
|
|
4883
|
+
window.$memberstackDom._showMessage("New password and confirm password do not match", true);
|
|
4884
|
+
return [2 /*return*/];
|
|
4885
|
+
}
|
|
4886
|
+
$$invalidate(8, profileLoader = true);
|
|
4887
|
+
_a.label = 1;
|
|
4888
|
+
case 1:
|
|
4889
|
+
_a.trys.push([1, 3, , 4]);
|
|
4890
|
+
return [4 /*yield*/, window.$memberstackDom.updateMemberAuth({
|
|
4891
|
+
oldPassword: currentPasswordValue,
|
|
4892
|
+
newPassword: newPasswordValue
|
|
4893
|
+
})];
|
|
4894
|
+
case 2:
|
|
4895
|
+
data = _a.sent();
|
|
4896
|
+
window.$memberstackDom._showMessage("Password successfully changed", false);
|
|
4897
|
+
$$invalidate(1, currentPasswordValue = "");
|
|
4898
|
+
$$invalidate(2, newPasswordValue = "");
|
|
4899
|
+
$$invalidate(3, confirmPasswordValue = "");
|
|
4900
|
+
$$invalidate(8, profileLoader = false);
|
|
4901
|
+
return [3 /*break*/, 4];
|
|
4902
|
+
case 3:
|
|
4903
|
+
err_7 = _a.sent();
|
|
4904
|
+
window.$memberstackDom._showMessage(err_7.message, true);
|
|
4905
|
+
$$invalidate(8, profileLoader = false);
|
|
4906
|
+
return [3 /*break*/, 4];
|
|
4907
|
+
case 4: return [2 /*return*/];
|
|
4908
|
+
}
|
|
4909
|
+
});
|
|
4910
|
+
});
|
|
4911
|
+
}
|
|
3671
4912
|
var click_handler = function () { return $$invalidate(0, displayProfile = "security"); };
|
|
4913
|
+
function passwordinput0_passwordValue_binding(value) {
|
|
4914
|
+
currentPasswordValue = value;
|
|
4915
|
+
$$invalidate(1, currentPasswordValue);
|
|
4916
|
+
}
|
|
4917
|
+
function passwordinput0_passwordInputValid_binding(value) {
|
|
4918
|
+
currentPasswordValid = value;
|
|
4919
|
+
$$invalidate(4, currentPasswordValid);
|
|
4920
|
+
}
|
|
4921
|
+
function passwordinput1_passwordValue_binding(value) {
|
|
4922
|
+
newPasswordValue = value;
|
|
4923
|
+
$$invalidate(2, newPasswordValue);
|
|
4924
|
+
}
|
|
4925
|
+
function passwordinput1_passwordInputValid_binding(value) {
|
|
4926
|
+
newPasswordValid = value;
|
|
4927
|
+
$$invalidate(5, newPasswordValid);
|
|
4928
|
+
}
|
|
4929
|
+
function passwordinput2_passwordValue_binding(value) {
|
|
4930
|
+
confirmPasswordValue = value;
|
|
4931
|
+
$$invalidate(3, confirmPasswordValue);
|
|
4932
|
+
}
|
|
4933
|
+
function passwordinput2_passwordInputValid_binding(value) {
|
|
4934
|
+
confirmPasswordValid = value;
|
|
4935
|
+
$$invalidate(6, confirmPasswordValid);
|
|
4936
|
+
}
|
|
3672
4937
|
$$self.$$set = function ($$props) {
|
|
3673
4938
|
if ('displayProfile' in $$props)
|
|
3674
4939
|
$$invalidate(0, displayProfile = $$props.displayProfile);
|
|
4940
|
+
if ('profileLoader' in $$props)
|
|
4941
|
+
$$invalidate(8, profileLoader = $$props.profileLoader);
|
|
3675
4942
|
};
|
|
3676
|
-
return [
|
|
4943
|
+
return [
|
|
4944
|
+
displayProfile,
|
|
4945
|
+
currentPasswordValue,
|
|
4946
|
+
newPasswordValue,
|
|
4947
|
+
confirmPasswordValue,
|
|
4948
|
+
currentPasswordValid,
|
|
4949
|
+
newPasswordValid,
|
|
4950
|
+
confirmPasswordValid,
|
|
4951
|
+
submitPasswordChange,
|
|
4952
|
+
profileLoader,
|
|
4953
|
+
click_handler,
|
|
4954
|
+
passwordinput0_passwordValue_binding,
|
|
4955
|
+
passwordinput0_passwordInputValid_binding,
|
|
4956
|
+
passwordinput1_passwordValue_binding,
|
|
4957
|
+
passwordinput1_passwordInputValid_binding,
|
|
4958
|
+
passwordinput2_passwordValue_binding,
|
|
4959
|
+
passwordinput2_passwordInputValid_binding
|
|
4960
|
+
];
|
|
3677
4961
|
}
|
|
3678
4962
|
var PasswordInfoContent = /** @class */ (function (_super) {
|
|
3679
4963
|
__extends(PasswordInfoContent, _super);
|
|
3680
4964
|
function PasswordInfoContent(options) {
|
|
3681
4965
|
var _this = _super.call(this) || this;
|
|
3682
|
-
init(_this, options, instance$2, create_fragment$
|
|
4966
|
+
init(_this, options, instance$2, create_fragment$3, safe_not_equal, { displayProfile: 0, profileLoader: 8 });
|
|
3683
4967
|
return _this;
|
|
3684
4968
|
}
|
|
3685
4969
|
return PasswordInfoContent;
|
|
3686
4970
|
}(SvelteComponent));
|
|
4971
|
+
function fade(node, _a) {
|
|
4972
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.delay, delay = _c === void 0 ? 0 : _c, _d = _b.duration, duration = _d === void 0 ? 400 : _d, _e = _b.easing, easing = _e === void 0 ? identity : _e;
|
|
4973
|
+
var o = +getComputedStyle(node).opacity;
|
|
4974
|
+
return {
|
|
4975
|
+
delay: delay,
|
|
4976
|
+
duration: duration,
|
|
4977
|
+
easing: easing,
|
|
4978
|
+
css: function (t) { return "opacity: " + t * o; }
|
|
4979
|
+
};
|
|
4980
|
+
}
|
|
4981
|
+
/* src/components/ProfileLoader.svelte generated by Svelte v3.48.0 */
|
|
4982
|
+
function create_fragment$2(ctx) {
|
|
4983
|
+
var div;
|
|
4984
|
+
var loadingicon;
|
|
4985
|
+
var div_transition;
|
|
4986
|
+
var current;
|
|
4987
|
+
loadingicon = new LoadingIcon({});
|
|
4988
|
+
return {
|
|
4989
|
+
c: function () {
|
|
4990
|
+
div = element("div");
|
|
4991
|
+
create_component(loadingicon.$$.fragment);
|
|
4992
|
+
attr(div, "class", "ms__profile__loader");
|
|
4993
|
+
},
|
|
4994
|
+
m: function (target, anchor) {
|
|
4995
|
+
insert(target, div, anchor);
|
|
4996
|
+
mount_component(loadingicon, div, null);
|
|
4997
|
+
current = true;
|
|
4998
|
+
},
|
|
4999
|
+
p: noop,
|
|
5000
|
+
i: function (local) {
|
|
5001
|
+
if (current)
|
|
5002
|
+
return;
|
|
5003
|
+
transition_in(loadingicon.$$.fragment, local);
|
|
5004
|
+
add_render_callback(function () {
|
|
5005
|
+
if (!div_transition)
|
|
5006
|
+
div_transition = create_bidirectional_transition(div, fade, {}, true);
|
|
5007
|
+
div_transition.run(1);
|
|
5008
|
+
});
|
|
5009
|
+
current = true;
|
|
5010
|
+
},
|
|
5011
|
+
o: function (local) {
|
|
5012
|
+
transition_out(loadingicon.$$.fragment, local);
|
|
5013
|
+
if (!div_transition)
|
|
5014
|
+
div_transition = create_bidirectional_transition(div, fade, {}, false);
|
|
5015
|
+
div_transition.run(0);
|
|
5016
|
+
current = false;
|
|
5017
|
+
},
|
|
5018
|
+
d: function (detaching) {
|
|
5019
|
+
if (detaching)
|
|
5020
|
+
detach(div);
|
|
5021
|
+
destroy_component(loadingicon);
|
|
5022
|
+
if (detaching && div_transition)
|
|
5023
|
+
div_transition.end();
|
|
5024
|
+
}
|
|
5025
|
+
};
|
|
5026
|
+
}
|
|
5027
|
+
var ProfileLoader = /** @class */ (function (_super) {
|
|
5028
|
+
__extends(ProfileLoader, _super);
|
|
5029
|
+
function ProfileLoader(options) {
|
|
5030
|
+
var _this = _super.call(this) || this;
|
|
5031
|
+
init(_this, options, null, create_fragment$2, safe_not_equal, {});
|
|
5032
|
+
return _this;
|
|
5033
|
+
}
|
|
5034
|
+
return ProfileLoader;
|
|
5035
|
+
}(SvelteComponent));
|
|
3687
5036
|
/* src/modals/ProfileModal.svelte generated by Svelte v3.48.0 */
|
|
5037
|
+
function create_else_block(ctx) {
|
|
5038
|
+
var memberstackicon;
|
|
5039
|
+
var current;
|
|
5040
|
+
memberstackicon = new MemberstackIcon({});
|
|
5041
|
+
return {
|
|
5042
|
+
c: function () {
|
|
5043
|
+
create_component(memberstackicon.$$.fragment);
|
|
5044
|
+
},
|
|
5045
|
+
m: function (target, anchor) {
|
|
5046
|
+
mount_component(memberstackicon, target, anchor);
|
|
5047
|
+
current = true;
|
|
5048
|
+
},
|
|
5049
|
+
p: noop,
|
|
5050
|
+
i: function (local) {
|
|
5051
|
+
if (current)
|
|
5052
|
+
return;
|
|
5053
|
+
transition_in(memberstackicon.$$.fragment, local);
|
|
5054
|
+
current = true;
|
|
5055
|
+
},
|
|
5056
|
+
o: function (local) {
|
|
5057
|
+
transition_out(memberstackicon.$$.fragment, local);
|
|
5058
|
+
current = false;
|
|
5059
|
+
},
|
|
5060
|
+
d: function (detaching) {
|
|
5061
|
+
destroy_component(memberstackicon, detaching);
|
|
5062
|
+
}
|
|
5063
|
+
};
|
|
5064
|
+
}
|
|
5065
|
+
// (32:6) {#if $app.branding.logo}
|
|
5066
|
+
function create_if_block_4$1(ctx) {
|
|
5067
|
+
var img;
|
|
5068
|
+
var img_src_value;
|
|
5069
|
+
var img_alt_value;
|
|
5070
|
+
return {
|
|
5071
|
+
c: function () {
|
|
5072
|
+
img = element("img");
|
|
5073
|
+
if (!src_url_equal(img.src, img_src_value = /*$app*/ ctx[7].branding.logo))
|
|
5074
|
+
attr(img, "src", img_src_value);
|
|
5075
|
+
attr(img, "alt", img_alt_value = /*$app*/ ctx[7].name);
|
|
5076
|
+
},
|
|
5077
|
+
m: function (target, anchor) {
|
|
5078
|
+
insert(target, img, anchor);
|
|
5079
|
+
},
|
|
5080
|
+
p: function (ctx, dirty) {
|
|
5081
|
+
if (dirty & /*$app*/ 128 && !src_url_equal(img.src, img_src_value = /*$app*/ ctx[7].branding.logo)) {
|
|
5082
|
+
attr(img, "src", img_src_value);
|
|
5083
|
+
}
|
|
5084
|
+
if (dirty & /*$app*/ 128 && img_alt_value !== (img_alt_value = /*$app*/ ctx[7].name)) {
|
|
5085
|
+
attr(img, "alt", img_alt_value);
|
|
5086
|
+
}
|
|
5087
|
+
},
|
|
5088
|
+
i: noop,
|
|
5089
|
+
o: noop,
|
|
5090
|
+
d: function (detaching) {
|
|
5091
|
+
if (detaching)
|
|
5092
|
+
detach(img);
|
|
5093
|
+
}
|
|
5094
|
+
};
|
|
5095
|
+
}
|
|
5096
|
+
// (54:6) {#if profileLoader}
|
|
5097
|
+
function create_if_block_3$1(ctx) {
|
|
5098
|
+
var profileloader;
|
|
5099
|
+
var current;
|
|
5100
|
+
profileloader = new ProfileLoader({});
|
|
5101
|
+
return {
|
|
5102
|
+
c: function () {
|
|
5103
|
+
create_component(profileloader.$$.fragment);
|
|
5104
|
+
},
|
|
5105
|
+
m: function (target, anchor) {
|
|
5106
|
+
mount_component(profileloader, target, anchor);
|
|
5107
|
+
current = true;
|
|
5108
|
+
},
|
|
5109
|
+
i: function (local) {
|
|
5110
|
+
if (current)
|
|
5111
|
+
return;
|
|
5112
|
+
transition_in(profileloader.$$.fragment, local);
|
|
5113
|
+
current = true;
|
|
5114
|
+
},
|
|
5115
|
+
o: function (local) {
|
|
5116
|
+
transition_out(profileloader.$$.fragment, local);
|
|
5117
|
+
current = false;
|
|
5118
|
+
},
|
|
5119
|
+
d: function (detaching) {
|
|
5120
|
+
destroy_component(profileloader, detaching);
|
|
5121
|
+
}
|
|
5122
|
+
};
|
|
5123
|
+
}
|
|
5124
|
+
// (65:52)
|
|
3688
5125
|
function create_if_block_2$1(ctx) {
|
|
3689
5126
|
var passwordinfocontent;
|
|
3690
5127
|
var updating_displayProfile;
|
|
5128
|
+
var updating_profileLoader;
|
|
3691
5129
|
var current;
|
|
3692
5130
|
function passwordinfocontent_displayProfile_binding(value) {
|
|
3693
|
-
/*passwordinfocontent_displayProfile_binding*/ ctx[
|
|
5131
|
+
/*passwordinfocontent_displayProfile_binding*/ ctx[15](value);
|
|
5132
|
+
}
|
|
5133
|
+
function passwordinfocontent_profileLoader_binding(value) {
|
|
5134
|
+
/*passwordinfocontent_profileLoader_binding*/ ctx[16](value);
|
|
3694
5135
|
}
|
|
3695
5136
|
var passwordinfocontent_props = {};
|
|
3696
5137
|
if ( /*displayProfile*/ctx[0] !== void 0) {
|
|
3697
5138
|
passwordinfocontent_props.displayProfile = /*displayProfile*/ ctx[0];
|
|
3698
5139
|
}
|
|
5140
|
+
if ( /*profileLoader*/ctx[5] !== void 0) {
|
|
5141
|
+
passwordinfocontent_props.profileLoader = /*profileLoader*/ ctx[5];
|
|
5142
|
+
}
|
|
3699
5143
|
passwordinfocontent = new PasswordInfoContent({ props: passwordinfocontent_props });
|
|
3700
5144
|
binding_callbacks.push(function () { return bind(passwordinfocontent, 'displayProfile', passwordinfocontent_displayProfile_binding); });
|
|
5145
|
+
binding_callbacks.push(function () { return bind(passwordinfocontent, 'profileLoader', passwordinfocontent_profileLoader_binding); });
|
|
3701
5146
|
return {
|
|
3702
5147
|
c: function () {
|
|
3703
5148
|
create_component(passwordinfocontent.$$.fragment);
|
|
@@ -3713,6 +5158,11 @@ function create_if_block_2$1(ctx) {
|
|
|
3713
5158
|
passwordinfocontent_changes.displayProfile = /*displayProfile*/ ctx[0];
|
|
3714
5159
|
add_flush_callback(function () { return updating_displayProfile = false; });
|
|
3715
5160
|
}
|
|
5161
|
+
if (!updating_profileLoader && dirty & /*profileLoader*/ 32) {
|
|
5162
|
+
updating_profileLoader = true;
|
|
5163
|
+
passwordinfocontent_changes.profileLoader = /*profileLoader*/ ctx[5];
|
|
5164
|
+
add_flush_callback(function () { return updating_profileLoader = false; });
|
|
5165
|
+
}
|
|
3716
5166
|
passwordinfocontent.$set(passwordinfocontent_changes);
|
|
3717
5167
|
},
|
|
3718
5168
|
i: function (local) {
|
|
@@ -3730,20 +5180,28 @@ function create_if_block_2$1(ctx) {
|
|
|
3730
5180
|
}
|
|
3731
5181
|
};
|
|
3732
5182
|
}
|
|
3733
|
-
// (
|
|
5183
|
+
// (63:46)
|
|
3734
5184
|
function create_if_block_1$1(ctx) {
|
|
3735
5185
|
var securityinfocontent;
|
|
3736
5186
|
var updating_displayProfile;
|
|
5187
|
+
var updating_profileLoader;
|
|
3737
5188
|
var current;
|
|
3738
5189
|
function securityinfocontent_displayProfile_binding(value) {
|
|
3739
|
-
/*securityinfocontent_displayProfile_binding*/ ctx[
|
|
5190
|
+
/*securityinfocontent_displayProfile_binding*/ ctx[13](value);
|
|
5191
|
+
}
|
|
5192
|
+
function securityinfocontent_profileLoader_binding(value) {
|
|
5193
|
+
/*securityinfocontent_profileLoader_binding*/ ctx[14](value);
|
|
3740
5194
|
}
|
|
3741
5195
|
var securityinfocontent_props = {};
|
|
3742
5196
|
if ( /*displayProfile*/ctx[0] !== void 0) {
|
|
3743
5197
|
securityinfocontent_props.displayProfile = /*displayProfile*/ ctx[0];
|
|
3744
5198
|
}
|
|
5199
|
+
if ( /*profileLoader*/ctx[5] !== void 0) {
|
|
5200
|
+
securityinfocontent_props.profileLoader = /*profileLoader*/ ctx[5];
|
|
5201
|
+
}
|
|
3745
5202
|
securityinfocontent = new SecurityInfoContent({ props: securityinfocontent_props });
|
|
3746
5203
|
binding_callbacks.push(function () { return bind(securityinfocontent, 'displayProfile', securityinfocontent_displayProfile_binding); });
|
|
5204
|
+
binding_callbacks.push(function () { return bind(securityinfocontent, 'profileLoader', securityinfocontent_profileLoader_binding); });
|
|
3747
5205
|
return {
|
|
3748
5206
|
c: function () {
|
|
3749
5207
|
create_component(securityinfocontent.$$.fragment);
|
|
@@ -3759,6 +5217,11 @@ function create_if_block_1$1(ctx) {
|
|
|
3759
5217
|
securityinfocontent_changes.displayProfile = /*displayProfile*/ ctx[0];
|
|
3760
5218
|
add_flush_callback(function () { return updating_displayProfile = false; });
|
|
3761
5219
|
}
|
|
5220
|
+
if (!updating_profileLoader && dirty & /*profileLoader*/ 32) {
|
|
5221
|
+
updating_profileLoader = true;
|
|
5222
|
+
securityinfocontent_changes.profileLoader = /*profileLoader*/ ctx[5];
|
|
5223
|
+
add_flush_callback(function () { return updating_profileLoader = false; });
|
|
5224
|
+
}
|
|
3762
5225
|
securityinfocontent.$set(securityinfocontent_changes);
|
|
3763
5226
|
},
|
|
3764
5227
|
i: function (local) {
|
|
@@ -3776,11 +5239,30 @@ function create_if_block_1$1(ctx) {
|
|
|
3776
5239
|
}
|
|
3777
5240
|
};
|
|
3778
5241
|
}
|
|
3779
|
-
// (
|
|
5242
|
+
// (57:6) {#if displayProfile === "profile"}
|
|
3780
5243
|
function create_if_block$1(ctx) {
|
|
3781
5244
|
var profileinfocontent;
|
|
5245
|
+
var updating_member;
|
|
5246
|
+
var updating_profileLoader;
|
|
3782
5247
|
var current;
|
|
3783
|
-
|
|
5248
|
+
function profileinfocontent_member_binding(value) {
|
|
5249
|
+
/*profileinfocontent_member_binding*/ ctx[11](value);
|
|
5250
|
+
}
|
|
5251
|
+
function profileinfocontent_profileLoader_binding(value) {
|
|
5252
|
+
/*profileinfocontent_profileLoader_binding*/ ctx[12](value);
|
|
5253
|
+
}
|
|
5254
|
+
var profileinfocontent_props = {
|
|
5255
|
+
customFields: /*$app*/ ctx[7].customFields
|
|
5256
|
+
};
|
|
5257
|
+
if ( /*member*/ctx[1] !== void 0) {
|
|
5258
|
+
profileinfocontent_props.member = /*member*/ ctx[1];
|
|
5259
|
+
}
|
|
5260
|
+
if ( /*profileLoader*/ctx[5] !== void 0) {
|
|
5261
|
+
profileinfocontent_props.profileLoader = /*profileLoader*/ ctx[5];
|
|
5262
|
+
}
|
|
5263
|
+
profileinfocontent = new ProfileInfoContent({ props: profileinfocontent_props });
|
|
5264
|
+
binding_callbacks.push(function () { return bind(profileinfocontent, 'member', profileinfocontent_member_binding); });
|
|
5265
|
+
binding_callbacks.push(function () { return bind(profileinfocontent, 'profileLoader', profileinfocontent_profileLoader_binding); });
|
|
3784
5266
|
return {
|
|
3785
5267
|
c: function () {
|
|
3786
5268
|
create_component(profileinfocontent.$$.fragment);
|
|
@@ -3789,7 +5271,22 @@ function create_if_block$1(ctx) {
|
|
|
3789
5271
|
mount_component(profileinfocontent, target, anchor);
|
|
3790
5272
|
current = true;
|
|
3791
5273
|
},
|
|
3792
|
-
p:
|
|
5274
|
+
p: function (ctx, dirty) {
|
|
5275
|
+
var profileinfocontent_changes = {};
|
|
5276
|
+
if (dirty & /*$app*/ 128)
|
|
5277
|
+
profileinfocontent_changes.customFields = /*$app*/ ctx[7].customFields;
|
|
5278
|
+
if (!updating_member && dirty & /*member*/ 2) {
|
|
5279
|
+
updating_member = true;
|
|
5280
|
+
profileinfocontent_changes.member = /*member*/ ctx[1];
|
|
5281
|
+
add_flush_callback(function () { return updating_member = false; });
|
|
5282
|
+
}
|
|
5283
|
+
if (!updating_profileLoader && dirty & /*profileLoader*/ 32) {
|
|
5284
|
+
updating_profileLoader = true;
|
|
5285
|
+
profileinfocontent_changes.profileLoader = /*profileLoader*/ ctx[5];
|
|
5286
|
+
add_flush_callback(function () { return updating_profileLoader = false; });
|
|
5287
|
+
}
|
|
5288
|
+
profileinfocontent.$set(profileinfocontent_changes);
|
|
5289
|
+
},
|
|
3793
5290
|
i: function (local) {
|
|
3794
5291
|
if (current)
|
|
3795
5292
|
return;
|
|
@@ -3809,39 +5306,71 @@ function create_fragment$1(ctx) {
|
|
|
3809
5306
|
var div5;
|
|
3810
5307
|
var div1;
|
|
3811
5308
|
var figure;
|
|
3812
|
-
var
|
|
5309
|
+
var current_block_type_index;
|
|
5310
|
+
var if_block0;
|
|
3813
5311
|
var t0;
|
|
3814
5312
|
var div0;
|
|
5313
|
+
var t1_value = /*member*/ ctx[1].auth.email + "";
|
|
5314
|
+
var t1;
|
|
3815
5315
|
var t2;
|
|
3816
5316
|
var closebutton;
|
|
3817
5317
|
var t3;
|
|
3818
5318
|
var div4;
|
|
3819
5319
|
var div2;
|
|
3820
5320
|
var profilemodalnav;
|
|
5321
|
+
var updating_member;
|
|
3821
5322
|
var updating_displayProfile;
|
|
5323
|
+
var updating_profileLoader;
|
|
3822
5324
|
var t4;
|
|
3823
5325
|
var div3;
|
|
3824
|
-
var current_block_type_index;
|
|
3825
|
-
var if_block;
|
|
3826
5326
|
var t5;
|
|
5327
|
+
var current_block_type_index_1;
|
|
5328
|
+
var if_block2;
|
|
5329
|
+
var t6;
|
|
3827
5330
|
var modalfooter;
|
|
3828
5331
|
var current;
|
|
3829
|
-
|
|
5332
|
+
var if_block_creators = [create_if_block_4$1, create_else_block];
|
|
5333
|
+
var if_blocks = [];
|
|
5334
|
+
function select_block_type(ctx, dirty) {
|
|
5335
|
+
if ( /*$app*/ctx[7].branding.logo)
|
|
5336
|
+
return 0;
|
|
5337
|
+
return 1;
|
|
5338
|
+
}
|
|
5339
|
+
current_block_type_index = select_block_type(ctx);
|
|
5340
|
+
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
3830
5341
|
closebutton = new CloseButton({
|
|
3831
|
-
props: { closeModal: /*closeModal*/ ctx[
|
|
5342
|
+
props: { closeModal: /*closeModal*/ ctx[3] }
|
|
3832
5343
|
});
|
|
5344
|
+
function profilemodalnav_member_binding(value) {
|
|
5345
|
+
/*profilemodalnav_member_binding*/ ctx[8](value);
|
|
5346
|
+
}
|
|
3833
5347
|
function profilemodalnav_displayProfile_binding(value) {
|
|
3834
|
-
/*profilemodalnav_displayProfile_binding*/ ctx[
|
|
5348
|
+
/*profilemodalnav_displayProfile_binding*/ ctx[9](value);
|
|
5349
|
+
}
|
|
5350
|
+
function profilemodalnav_profileLoader_binding(value) {
|
|
5351
|
+
/*profilemodalnav_profileLoader_binding*/ ctx[10](value);
|
|
5352
|
+
}
|
|
5353
|
+
var profilemodalnav_props = {
|
|
5354
|
+
onSuccessLogout: /*onSuccessLogout*/ ctx[2],
|
|
5355
|
+
hideProfileSection: /*hideProfileSection*/ ctx[4]
|
|
5356
|
+
};
|
|
5357
|
+
if ( /*member*/ctx[1] !== void 0) {
|
|
5358
|
+
profilemodalnav_props.member = /*member*/ ctx[1];
|
|
3835
5359
|
}
|
|
3836
|
-
var profilemodalnav_props = {};
|
|
3837
5360
|
if ( /*displayProfile*/ctx[0] !== void 0) {
|
|
3838
5361
|
profilemodalnav_props.displayProfile = /*displayProfile*/ ctx[0];
|
|
3839
5362
|
}
|
|
5363
|
+
if ( /*profileLoader*/ctx[5] !== void 0) {
|
|
5364
|
+
profilemodalnav_props.profileLoader = /*profileLoader*/ ctx[5];
|
|
5365
|
+
}
|
|
3840
5366
|
profilemodalnav = new ProfileModalNav({ props: profilemodalnav_props });
|
|
5367
|
+
binding_callbacks.push(function () { return bind(profilemodalnav, 'member', profilemodalnav_member_binding); });
|
|
3841
5368
|
binding_callbacks.push(function () { return bind(profilemodalnav, 'displayProfile', profilemodalnav_displayProfile_binding); });
|
|
3842
|
-
|
|
3843
|
-
var
|
|
3844
|
-
|
|
5369
|
+
binding_callbacks.push(function () { return bind(profilemodalnav, 'profileLoader', profilemodalnav_profileLoader_binding); });
|
|
5370
|
+
var if_block1 = /*profileLoader*/ ctx[5] && create_if_block_3$1();
|
|
5371
|
+
var if_block_creators_1 = [create_if_block$1, create_if_block_1$1, create_if_block_2$1];
|
|
5372
|
+
var if_blocks_1 = [];
|
|
5373
|
+
function select_block_type_1(ctx, dirty) {
|
|
3845
5374
|
if ( /*displayProfile*/ctx[0] === "profile")
|
|
3846
5375
|
return 0;
|
|
3847
5376
|
if ( /*displayProfile*/ctx[0] === "security")
|
|
@@ -3850,8 +5379,8 @@ function create_fragment$1(ctx) {
|
|
|
3850
5379
|
return 2;
|
|
3851
5380
|
return -1;
|
|
3852
5381
|
}
|
|
3853
|
-
if (~(
|
|
3854
|
-
|
|
5382
|
+
if (~(current_block_type_index_1 = select_block_type_1(ctx))) {
|
|
5383
|
+
if_block2 = if_blocks_1[current_block_type_index_1] = if_block_creators_1[current_block_type_index_1](ctx);
|
|
3855
5384
|
}
|
|
3856
5385
|
modalfooter = new ModalFooter({});
|
|
3857
5386
|
return {
|
|
@@ -3859,10 +5388,10 @@ function create_fragment$1(ctx) {
|
|
|
3859
5388
|
div5 = element("div");
|
|
3860
5389
|
div1 = element("div");
|
|
3861
5390
|
figure = element("figure");
|
|
3862
|
-
|
|
5391
|
+
if_block0.c();
|
|
3863
5392
|
t0 = space();
|
|
3864
5393
|
div0 = element("div");
|
|
3865
|
-
|
|
5394
|
+
t1 = text(t1_value);
|
|
3866
5395
|
t2 = space();
|
|
3867
5396
|
create_component(closebutton.$$.fragment);
|
|
3868
5397
|
t3 = space();
|
|
@@ -3871,14 +5400,18 @@ function create_fragment$1(ctx) {
|
|
|
3871
5400
|
create_component(profilemodalnav.$$.fragment);
|
|
3872
5401
|
t4 = space();
|
|
3873
5402
|
div3 = element("div");
|
|
3874
|
-
if (
|
|
3875
|
-
|
|
5403
|
+
if (if_block1)
|
|
5404
|
+
if_block1.c();
|
|
3876
5405
|
t5 = space();
|
|
5406
|
+
if (if_block2)
|
|
5407
|
+
if_block2.c();
|
|
5408
|
+
t6 = space();
|
|
3877
5409
|
create_component(modalfooter.$$.fragment);
|
|
3878
5410
|
attr(figure, "class", "ms-modal__figure ms-modal__figure--profile");
|
|
3879
5411
|
attr(div1, "class", "ms-modal__header");
|
|
3880
5412
|
attr(div2, "class", "ms-modal__content-left");
|
|
3881
5413
|
attr(div3, "class", "ms-modal__content-right");
|
|
5414
|
+
set_style(div3, "height", /*profileSectionHeight*/ ctx[6]);
|
|
3882
5415
|
attr(div4, "class", "ms-modal__content ms-modal__content--profile");
|
|
3883
5416
|
attr(div5, "class", "ms-modal ms-modal--profile");
|
|
3884
5417
|
attr(div5, "id", "ProfileModal");
|
|
@@ -3887,9 +5420,10 @@ function create_fragment$1(ctx) {
|
|
|
3887
5420
|
insert(target, div5, anchor);
|
|
3888
5421
|
append(div5, div1);
|
|
3889
5422
|
append(div1, figure);
|
|
3890
|
-
|
|
5423
|
+
if_blocks[current_block_type_index].m(figure, null);
|
|
3891
5424
|
append(div1, t0);
|
|
3892
5425
|
append(div1, div0);
|
|
5426
|
+
append(div0, t1);
|
|
3893
5427
|
append(div1, t2);
|
|
3894
5428
|
mount_component(closebutton, div1, null);
|
|
3895
5429
|
append(div5, t3);
|
|
@@ -3898,120 +5432,240 @@ function create_fragment$1(ctx) {
|
|
|
3898
5432
|
mount_component(profilemodalnav, div2, null);
|
|
3899
5433
|
append(div4, t4);
|
|
3900
5434
|
append(div4, div3);
|
|
3901
|
-
if (
|
|
3902
|
-
|
|
5435
|
+
if (if_block1)
|
|
5436
|
+
if_block1.m(div3, null);
|
|
5437
|
+
append(div3, t5);
|
|
5438
|
+
if (~current_block_type_index_1) {
|
|
5439
|
+
if_blocks_1[current_block_type_index_1].m(div3, null);
|
|
5440
|
+
}
|
|
5441
|
+
append(div5, t6);
|
|
5442
|
+
mount_component(modalfooter, div5, null);
|
|
5443
|
+
current = true;
|
|
5444
|
+
},
|
|
5445
|
+
p: function (ctx, _a) {
|
|
5446
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
5447
|
+
var previous_block_index = current_block_type_index;
|
|
5448
|
+
current_block_type_index = select_block_type(ctx);
|
|
5449
|
+
if (current_block_type_index === previous_block_index) {
|
|
5450
|
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
|
5451
|
+
}
|
|
5452
|
+
else {
|
|
5453
|
+
group_outros();
|
|
5454
|
+
transition_out(if_blocks[previous_block_index], 1, 1, function () {
|
|
5455
|
+
if_blocks[previous_block_index] = null;
|
|
5456
|
+
});
|
|
5457
|
+
check_outros();
|
|
5458
|
+
if_block0 = if_blocks[current_block_type_index];
|
|
5459
|
+
if (!if_block0) {
|
|
5460
|
+
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
5461
|
+
if_block0.c();
|
|
5462
|
+
}
|
|
5463
|
+
else {
|
|
5464
|
+
if_block0.p(ctx, dirty);
|
|
5465
|
+
}
|
|
5466
|
+
transition_in(if_block0, 1);
|
|
5467
|
+
if_block0.m(figure, null);
|
|
3903
5468
|
}
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
current = true;
|
|
3907
|
-
},
|
|
3908
|
-
p: function (ctx, _a) {
|
|
3909
|
-
var _b = __read(_a, 1), dirty = _b[0];
|
|
5469
|
+
if ((!current || dirty & /*member*/ 2) && t1_value !== (t1_value = /*member*/ ctx[1].auth.email + ""))
|
|
5470
|
+
set_data(t1, t1_value);
|
|
3910
5471
|
var closebutton_changes = {};
|
|
3911
|
-
if (dirty & /*closeModal*/
|
|
3912
|
-
closebutton_changes.closeModal = /*closeModal*/ ctx[
|
|
5472
|
+
if (dirty & /*closeModal*/ 8)
|
|
5473
|
+
closebutton_changes.closeModal = /*closeModal*/ ctx[3];
|
|
3913
5474
|
closebutton.$set(closebutton_changes);
|
|
3914
5475
|
var profilemodalnav_changes = {};
|
|
5476
|
+
if (dirty & /*onSuccessLogout*/ 4)
|
|
5477
|
+
profilemodalnav_changes.onSuccessLogout = /*onSuccessLogout*/ ctx[2];
|
|
5478
|
+
if (dirty & /*hideProfileSection*/ 16)
|
|
5479
|
+
profilemodalnav_changes.hideProfileSection = /*hideProfileSection*/ ctx[4];
|
|
5480
|
+
if (!updating_member && dirty & /*member*/ 2) {
|
|
5481
|
+
updating_member = true;
|
|
5482
|
+
profilemodalnav_changes.member = /*member*/ ctx[1];
|
|
5483
|
+
add_flush_callback(function () { return updating_member = false; });
|
|
5484
|
+
}
|
|
3915
5485
|
if (!updating_displayProfile && dirty & /*displayProfile*/ 1) {
|
|
3916
5486
|
updating_displayProfile = true;
|
|
3917
5487
|
profilemodalnav_changes.displayProfile = /*displayProfile*/ ctx[0];
|
|
3918
5488
|
add_flush_callback(function () { return updating_displayProfile = false; });
|
|
3919
5489
|
}
|
|
5490
|
+
if (!updating_profileLoader && dirty & /*profileLoader*/ 32) {
|
|
5491
|
+
updating_profileLoader = true;
|
|
5492
|
+
profilemodalnav_changes.profileLoader = /*profileLoader*/ ctx[5];
|
|
5493
|
+
add_flush_callback(function () { return updating_profileLoader = false; });
|
|
5494
|
+
}
|
|
3920
5495
|
profilemodalnav.$set(profilemodalnav_changes);
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
5496
|
+
if ( /*profileLoader*/ctx[5]) {
|
|
5497
|
+
if (if_block1) {
|
|
5498
|
+
if (dirty & /*profileLoader*/ 32) {
|
|
5499
|
+
transition_in(if_block1, 1);
|
|
5500
|
+
}
|
|
5501
|
+
}
|
|
5502
|
+
else {
|
|
5503
|
+
if_block1 = create_if_block_3$1();
|
|
5504
|
+
if_block1.c();
|
|
5505
|
+
transition_in(if_block1, 1);
|
|
5506
|
+
if_block1.m(div3, t5);
|
|
5507
|
+
}
|
|
5508
|
+
}
|
|
5509
|
+
else if (if_block1) {
|
|
5510
|
+
group_outros();
|
|
5511
|
+
transition_out(if_block1, 1, 1, function () {
|
|
5512
|
+
if_block1 = null;
|
|
5513
|
+
});
|
|
5514
|
+
check_outros();
|
|
5515
|
+
}
|
|
5516
|
+
var previous_block_index_1 = current_block_type_index_1;
|
|
5517
|
+
current_block_type_index_1 = select_block_type_1(ctx);
|
|
5518
|
+
if (current_block_type_index_1 === previous_block_index_1) {
|
|
5519
|
+
if (~current_block_type_index_1) {
|
|
5520
|
+
if_blocks_1[current_block_type_index_1].p(ctx, dirty);
|
|
3926
5521
|
}
|
|
3927
5522
|
}
|
|
3928
5523
|
else {
|
|
3929
|
-
if (
|
|
5524
|
+
if (if_block2) {
|
|
3930
5525
|
group_outros();
|
|
3931
|
-
transition_out(
|
|
3932
|
-
|
|
5526
|
+
transition_out(if_blocks_1[previous_block_index_1], 1, 1, function () {
|
|
5527
|
+
if_blocks_1[previous_block_index_1] = null;
|
|
3933
5528
|
});
|
|
3934
5529
|
check_outros();
|
|
3935
5530
|
}
|
|
3936
|
-
if (~
|
|
3937
|
-
|
|
3938
|
-
if (!
|
|
3939
|
-
|
|
3940
|
-
|
|
5531
|
+
if (~current_block_type_index_1) {
|
|
5532
|
+
if_block2 = if_blocks_1[current_block_type_index_1];
|
|
5533
|
+
if (!if_block2) {
|
|
5534
|
+
if_block2 = if_blocks_1[current_block_type_index_1] = if_block_creators_1[current_block_type_index_1](ctx);
|
|
5535
|
+
if_block2.c();
|
|
3941
5536
|
}
|
|
3942
5537
|
else {
|
|
3943
|
-
|
|
5538
|
+
if_block2.p(ctx, dirty);
|
|
3944
5539
|
}
|
|
3945
|
-
transition_in(
|
|
3946
|
-
|
|
5540
|
+
transition_in(if_block2, 1);
|
|
5541
|
+
if_block2.m(div3, null);
|
|
3947
5542
|
}
|
|
3948
5543
|
else {
|
|
3949
|
-
|
|
5544
|
+
if_block2 = null;
|
|
3950
5545
|
}
|
|
3951
5546
|
}
|
|
5547
|
+
if (!current || dirty & /*profileSectionHeight*/ 64) {
|
|
5548
|
+
set_style(div3, "height", /*profileSectionHeight*/ ctx[6]);
|
|
5549
|
+
}
|
|
3952
5550
|
},
|
|
3953
5551
|
i: function (local) {
|
|
3954
5552
|
if (current)
|
|
3955
5553
|
return;
|
|
3956
|
-
transition_in(
|
|
5554
|
+
transition_in(if_block0);
|
|
3957
5555
|
transition_in(closebutton.$$.fragment, local);
|
|
3958
5556
|
transition_in(profilemodalnav.$$.fragment, local);
|
|
3959
|
-
transition_in(
|
|
5557
|
+
transition_in(if_block1);
|
|
5558
|
+
transition_in(if_block2);
|
|
3960
5559
|
transition_in(modalfooter.$$.fragment, local);
|
|
3961
5560
|
current = true;
|
|
3962
5561
|
},
|
|
3963
5562
|
o: function (local) {
|
|
3964
|
-
transition_out(
|
|
5563
|
+
transition_out(if_block0);
|
|
3965
5564
|
transition_out(closebutton.$$.fragment, local);
|
|
3966
5565
|
transition_out(profilemodalnav.$$.fragment, local);
|
|
3967
|
-
transition_out(
|
|
5566
|
+
transition_out(if_block1);
|
|
5567
|
+
transition_out(if_block2);
|
|
3968
5568
|
transition_out(modalfooter.$$.fragment, local);
|
|
3969
5569
|
current = false;
|
|
3970
5570
|
},
|
|
3971
5571
|
d: function (detaching) {
|
|
3972
5572
|
if (detaching)
|
|
3973
5573
|
detach(div5);
|
|
3974
|
-
|
|
5574
|
+
if_blocks[current_block_type_index].d();
|
|
3975
5575
|
destroy_component(closebutton);
|
|
3976
5576
|
destroy_component(profilemodalnav);
|
|
3977
|
-
if (
|
|
3978
|
-
|
|
5577
|
+
if (if_block1)
|
|
5578
|
+
if_block1.d();
|
|
5579
|
+
if (~current_block_type_index_1) {
|
|
5580
|
+
if_blocks_1[current_block_type_index_1].d();
|
|
3979
5581
|
}
|
|
3980
5582
|
destroy_component(modalfooter);
|
|
3981
5583
|
}
|
|
3982
5584
|
};
|
|
3983
5585
|
}
|
|
3984
5586
|
function instance$1($$self, $$props, $$invalidate) {
|
|
5587
|
+
var profileSectionHeight;
|
|
5588
|
+
var $app;
|
|
5589
|
+
component_subscribe($$self, AppStore, function ($$value) { return $$invalidate(7, $app = $$value); });
|
|
5590
|
+
var onSuccessLogout = $$props.onSuccessLogout;
|
|
3985
5591
|
var closeModal = $$props.closeModal;
|
|
3986
|
-
var logout = $$props.logout;
|
|
3987
5592
|
var _a = $$props.displayProfile, displayProfile = _a === void 0 ? "profile" : _a;
|
|
5593
|
+
var member = $$props.member;
|
|
5594
|
+
var hideProfileSection = false;
|
|
5595
|
+
var profileLoader = false;
|
|
5596
|
+
if (!$app.customFields.filter(function (field) { return !field.hidden; }).length) {
|
|
5597
|
+
displayProfile = "security";
|
|
5598
|
+
hideProfileSection = true;
|
|
5599
|
+
}
|
|
5600
|
+
function profilemodalnav_member_binding(value) {
|
|
5601
|
+
member = value;
|
|
5602
|
+
$$invalidate(1, member);
|
|
5603
|
+
}
|
|
3988
5604
|
function profilemodalnav_displayProfile_binding(value) {
|
|
3989
5605
|
displayProfile = value;
|
|
3990
5606
|
$$invalidate(0, displayProfile);
|
|
3991
5607
|
}
|
|
5608
|
+
function profilemodalnav_profileLoader_binding(value) {
|
|
5609
|
+
profileLoader = value;
|
|
5610
|
+
$$invalidate(5, profileLoader);
|
|
5611
|
+
}
|
|
5612
|
+
function profileinfocontent_member_binding(value) {
|
|
5613
|
+
member = value;
|
|
5614
|
+
$$invalidate(1, member);
|
|
5615
|
+
}
|
|
5616
|
+
function profileinfocontent_profileLoader_binding(value) {
|
|
5617
|
+
profileLoader = value;
|
|
5618
|
+
$$invalidate(5, profileLoader);
|
|
5619
|
+
}
|
|
3992
5620
|
function securityinfocontent_displayProfile_binding(value) {
|
|
3993
5621
|
displayProfile = value;
|
|
3994
5622
|
$$invalidate(0, displayProfile);
|
|
3995
5623
|
}
|
|
5624
|
+
function securityinfocontent_profileLoader_binding(value) {
|
|
5625
|
+
profileLoader = value;
|
|
5626
|
+
$$invalidate(5, profileLoader);
|
|
5627
|
+
}
|
|
3996
5628
|
function passwordinfocontent_displayProfile_binding(value) {
|
|
3997
5629
|
displayProfile = value;
|
|
3998
5630
|
$$invalidate(0, displayProfile);
|
|
3999
5631
|
}
|
|
5632
|
+
function passwordinfocontent_profileLoader_binding(value) {
|
|
5633
|
+
profileLoader = value;
|
|
5634
|
+
$$invalidate(5, profileLoader);
|
|
5635
|
+
}
|
|
4000
5636
|
$$self.$$set = function ($$props) {
|
|
5637
|
+
if ('onSuccessLogout' in $$props)
|
|
5638
|
+
$$invalidate(2, onSuccessLogout = $$props.onSuccessLogout);
|
|
4001
5639
|
if ('closeModal' in $$props)
|
|
4002
|
-
$$invalidate(
|
|
4003
|
-
if ('logout' in $$props)
|
|
4004
|
-
$$invalidate(2, logout = $$props.logout);
|
|
5640
|
+
$$invalidate(3, closeModal = $$props.closeModal);
|
|
4005
5641
|
if ('displayProfile' in $$props)
|
|
4006
5642
|
$$invalidate(0, displayProfile = $$props.displayProfile);
|
|
5643
|
+
if ('member' in $$props)
|
|
5644
|
+
$$invalidate(1, member = $$props.member);
|
|
5645
|
+
};
|
|
5646
|
+
$$self.$$.update = function () {
|
|
5647
|
+
if ($$self.$$.dirty & /*displayProfile*/ 1) {
|
|
5648
|
+
$$invalidate(6, profileSectionHeight = displayProfile === "profile" ? "400px" : "300px");
|
|
5649
|
+
}
|
|
4007
5650
|
};
|
|
4008
5651
|
return [
|
|
4009
5652
|
displayProfile,
|
|
5653
|
+
member,
|
|
5654
|
+
onSuccessLogout,
|
|
4010
5655
|
closeModal,
|
|
4011
|
-
|
|
5656
|
+
hideProfileSection,
|
|
5657
|
+
profileLoader,
|
|
5658
|
+
profileSectionHeight,
|
|
5659
|
+
$app,
|
|
5660
|
+
profilemodalnav_member_binding,
|
|
4012
5661
|
profilemodalnav_displayProfile_binding,
|
|
5662
|
+
profilemodalnav_profileLoader_binding,
|
|
5663
|
+
profileinfocontent_member_binding,
|
|
5664
|
+
profileinfocontent_profileLoader_binding,
|
|
4013
5665
|
securityinfocontent_displayProfile_binding,
|
|
4014
|
-
|
|
5666
|
+
securityinfocontent_profileLoader_binding,
|
|
5667
|
+
passwordinfocontent_displayProfile_binding,
|
|
5668
|
+
passwordinfocontent_profileLoader_binding
|
|
4015
5669
|
];
|
|
4016
5670
|
}
|
|
4017
5671
|
var ProfileModal = /** @class */ (function (_super) {
|
|
@@ -4019,9 +5673,10 @@ var ProfileModal = /** @class */ (function (_super) {
|
|
|
4019
5673
|
function ProfileModal(options) {
|
|
4020
5674
|
var _this = _super.call(this) || this;
|
|
4021
5675
|
init(_this, options, instance$1, create_fragment$1, safe_not_equal, {
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
displayProfile: 0
|
|
5676
|
+
onSuccessLogout: 2,
|
|
5677
|
+
closeModal: 3,
|
|
5678
|
+
displayProfile: 0,
|
|
5679
|
+
member: 1
|
|
4025
5680
|
});
|
|
4026
5681
|
return _this;
|
|
4027
5682
|
}
|
|
@@ -4029,93 +5684,119 @@ var ProfileModal = /** @class */ (function (_super) {
|
|
|
4029
5684
|
}(SvelteComponent));
|
|
4030
5685
|
/* src/Main.svelte generated by Svelte v3.48.0 */
|
|
4031
5686
|
function add_css(target) {
|
|
4032
|
-
append_styles(target, "svelte-
|
|
5687
|
+
append_styles(target, "svelte-1fq6c9b", "@import url(\"https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap\");#msOverlay.svelte-1fq6c9b{position:fixed;display:flex;justify-content:center;align-items:center;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);z-index:99999;overflow:scroll;font-family:\"Plus Jakarta Sans\", sans-serif}.--hide{display:none}.ms__loader{position:relative;z-index:10000000}#msLoader path{fill:#007ace}.ms__profile__loader{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background:rgb(255 255 255 / 75%)}.ms-modal{box-sizing:border-box;margin:auto;min-width:0;position:relative;outline:none;background:white;border-radius:16px;box-shadow:2px 2px 12px rgb(0 0 0 / 10%);width:360px;color:rgb(10, 10, 10)}.ms-modal--profile{width:700px}.ms-modal__close{box-sizing:border-box;margin:0;min-width:0;position:absolute;top:16px;right:16px;z-index:10;line-height:0}.ms-modal__close button{appearance:none;padding:0;outline:none;width:12px;border:0;background:transparent;cursor:pointer;color:#5c5c5c}.ms-modal__close button:hover{color:#0a0a0a}.ms-modal__back{box-sizing:border-box;margin:0;min-width:0;position:absolute;top:16px;left:16px;z-index:10;line-height:0}.ms-modal__back button{appearance:none;padding:0;outline:none;width:12px;border:0;background:transparent;cursor:pointer;color:#5c5c5c}.ms-modal__back button:hover, .ms-modal__profile-back button:hover{color:#0a0a0a}.ms-modal__back svg{height:12px}.ms-modal__profile-back button{appearance:none;padding:5px;margin-right:6px;outline:none;width:25px;height:25px;border:0;background:transparent;cursor:pointer;color:#5c5c5c;display:flex;align-items:stretch;justify-content:center}.ms-modal__header{display:flex;align-items:center;padding:12px}.ms-modal__content{padding:28px 28px 20px;width:100%;box-sizing:border-box;margin:0 auto}.ms-modal__content--profile{padding:0;display:flex;flex-wrap:wrap;align-content:stretch;align-items:stretch;border-top:1px solid #DDDDDD}.ms-modal__content-left{display:flex;flex-direction:column;align-items:flex-start;padding:20px;border-right:1px solid #DDDDDD;min-width:160px}.ms-modal__content-right{padding:20px;flex-grow:1;height:100%;min-height:300px;max-height:400px;overflow-y:auto;position:relative;transition:height 0.3s ease-in-out}.ms-modal__figure{box-sizing:border-box;margin:8px auto;width:44px;height:44px;border-style:solid;border-width:1px;border-color:rgb(235, 235, 235);box-shadow:rgb(0 0 0 / 4%) 0px 2px 2px 0px;display:flex;position:relative;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;flex-shrink:0;line-height:1;border-radius:50%;overflow:hidden}.ms-modal__figure--profile{width:24px;height:24px;padding:0px;margin:0px 8px 0px 0px}.ms-modal__figure img{width:100%;height:100%;text-align:center;object-fit:cover;color:transparent;text-indent:10000px}.ms-modal__title-container{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.ms-modal__title{margin-bottom:36px;margin-top:0;text-align:center;font-size:24px;line-height:32px;font-weight:700}.ms-modal__title--profile{margin-bottom:0px}.ms-modal__title-group{display:flex;align-items:center}.ms-modal__title--sub-text{margin-bottom:8px}.ms-modal__text{font-weight:500;font-size:16px;line-height:28px;text-align:center;margin:0 0 20px 0}.ms-form{width:100%}.ms-form__group{margin-bottom:20px}.ms-form__flex{display:flex;justify-content:space-between;align-content:center}.ms-form__flex--centered{justify-content:center}.ms-form__label{margin-bottom:4px;margin-top:0px;font-size:14px;line-height:24px;font-weight:700}.ms-form__fieldset{display:flex;justify-content:space-between;padding:0;border:none}.ms-form__input{box-sizing:border-box;margin:0px;border:1px solid rgb(201, 201, 201);border-radius:6px;font-size:16px;font-weight:400;padding:15px;width:100%}.ms-form__password-container{display:flex;justify-content:space-between;align-content:center;box-sizing:border-box;margin:0px;border:1px solid rgb(201, 201, 201);border-radius:6px;width:100%}.ms-form__password-container:focus-within{border:1px solid rgb(0, 68, 252);outline:rgb(0, 68, 252) solid 1px}.ms-form__password-container:focus-within input{outline:none;border-color:rgb(201, 201, 201);box-shadow:none}.ms-form__input--password{border:none}.ms-form__input--token{font-weight:500;font-size:24.19px;line-height:32px;text-align:center;color:#000000;padding:9px;max-width:42px}.ms-form__show-toggle{cursor:pointer;background:transparent;border-radius:0px 6px 6px 0px;padding:0px 8px;display:flex;align-items:center}.ms-form__eye{display:block;width:22px}.ms-form__eye-slash{display:block;width:22px}.ms-form__error{font-weight:500;font-size:12px;line-height:16px;color:#e40023;margin-top:4px;display:flex;align-items:baseline}.ms-form__error svg{width:10px;height:10px;margin-right:5px}.ms-form__label--right a{color:rgb(10, 10, 10) !important;text-decoration:none;font-weight:400}.ms-form__button{border-radius:6px;font-weight:700;font-size:16px;padding-left:22px;padding-right:22px;height:52px;border:none;display:block;width:100%;background-color:rgb(41, 98, 255);color:#fff;transition:background-color 0.5s ease;cursor:pointer}.ms-form__button:hover{background-color:#0745ff}.ms-form__button:disabled{background-color:#96C0FE;color:#fff;pointer-events:none;display:flex;justify-content:center;align-items:center}.ms-form__button--text{background-color:transparent;padding:0px;height:auto;margin-bottom:0px;margin-top:0px;font-size:14px;line-height:28px;font-weight:500;color:#0A0A0A;opacity:0.8}.ms-form__button--text:hover{background-color:transparent}#msFormLoader path{fill:#fff}a.ms-form__link{margin-top:8px;font-weight:500;font-size:14px;line-height:24px;color:rgb(10, 10, 10) !important;text-decoration:none;opacity:0.8}.ms-modal__cancel-button{background:#F6F6F6;color:#828282;padding:8px;margin-right:8px;border-radius:4px;border:none;font-weight:700;font-size:14px;line-height:16px;cursor:pointer}.ms-modal__save-button{background:#2962FF;color:#fff;padding:8px;border-radius:4px;border:none;font-weight:700;font-size:14px;line-height:16px;cursor:pointer}.ms-modal__save-button:disabled{background:#80a1fc;color:#fff;cursor:default}.ms-modal__outline-button{background:#fff;color:#0A0A0A;font-weight:700;font-size:14px;line-height:16px;padding:12px;margin-right:8px;border-radius:4px;border:1px solid #DDDDDD;cursor:pointer}.ms-modal__outline-button svg{height:14px;margin-right:6px}.ms-modal__button-label{margin-bottom:4px;margin-top:0px;font-size:14px;line-height:28px;font-weight:500}.ms-modal__profile-option{cursor:pointer;margin-bottom:20px;font-weight:500;font-size:16px;line-height:28px;background:transparent;border:none;padding:0px}.ms-modal__profile-option svg{height:14px;margin-right:8px}.ms-modal__profile-option:hover{color:#2962FF}.ms-modal__profile-option--active{color:#2962FF}.ms-modal__social-divider{display:flex;align-items:center;margin:20px 0px}.ms-modal__divider-line{text-align:center;background:#dddddd;height:1px;width:100%}.ms-modal__divider-text{padding:0px 4px}.ms-modal__footer{text-align:center;width:100%;box-sizing:border-box;margin:0;min-width:0;background:#f6f6f6;padding-top:10px;padding-bottom:10px;border-bottom-left-radius:16px;border-bottom-right-radius:16px;border-top:1px solid;border-top-color:#dddddd;font-size:12px;line-height:16px;font-weight:500}.ms-modal__footer a{color:rgb(10, 10, 10);text-decoration:none;display:flex;justify-content:center;align-items:center}.ms-modal__footer svg{height:12px;width:12px;margin-right:5.5px}");
|
|
4033
5688
|
}
|
|
4034
|
-
// (
|
|
4035
|
-
function
|
|
4036
|
-
var
|
|
5689
|
+
// (86:36)
|
|
5690
|
+
function create_if_block_6(ctx) {
|
|
5691
|
+
var profilemodal;
|
|
5692
|
+
var updating_display;
|
|
4037
5693
|
var current;
|
|
4038
|
-
|
|
5694
|
+
function profilemodal_display_binding(value) {
|
|
5695
|
+
/*profilemodal_display_binding*/ ctx[15](value);
|
|
5696
|
+
}
|
|
5697
|
+
var profilemodal_props = {
|
|
5698
|
+
closeModal: /*closeModal*/ ctx[5],
|
|
5699
|
+
onSuccessLogout: /*onSuccess*/ ctx[2],
|
|
5700
|
+
member: /*member*/ ctx[3]
|
|
5701
|
+
};
|
|
5702
|
+
if ( /*display*/ctx[0] !== void 0) {
|
|
5703
|
+
profilemodal_props.display = /*display*/ ctx[0];
|
|
5704
|
+
}
|
|
5705
|
+
profilemodal = new ProfileModal({ props: profilemodal_props });
|
|
5706
|
+
binding_callbacks.push(function () { return bind(profilemodal, 'display', profilemodal_display_binding); });
|
|
4039
5707
|
return {
|
|
4040
5708
|
c: function () {
|
|
4041
|
-
create_component(
|
|
5709
|
+
create_component(profilemodal.$$.fragment);
|
|
4042
5710
|
},
|
|
4043
5711
|
m: function (target, anchor) {
|
|
4044
|
-
mount_component(
|
|
5712
|
+
mount_component(profilemodal, target, anchor);
|
|
4045
5713
|
current = true;
|
|
4046
5714
|
},
|
|
5715
|
+
p: function (ctx, dirty) {
|
|
5716
|
+
var profilemodal_changes = {};
|
|
5717
|
+
if (dirty & /*onSuccess*/ 4)
|
|
5718
|
+
profilemodal_changes.onSuccessLogout = /*onSuccess*/ ctx[2];
|
|
5719
|
+
if (dirty & /*member*/ 8)
|
|
5720
|
+
profilemodal_changes.member = /*member*/ ctx[3];
|
|
5721
|
+
if (!updating_display && dirty & /*display*/ 1) {
|
|
5722
|
+
updating_display = true;
|
|
5723
|
+
profilemodal_changes.display = /*display*/ ctx[0];
|
|
5724
|
+
add_flush_callback(function () { return updating_display = false; });
|
|
5725
|
+
}
|
|
5726
|
+
profilemodal.$set(profilemodal_changes);
|
|
5727
|
+
},
|
|
4047
5728
|
i: function (local) {
|
|
4048
5729
|
if (current)
|
|
4049
5730
|
return;
|
|
4050
|
-
transition_in(
|
|
5731
|
+
transition_in(profilemodal.$$.fragment, local);
|
|
4051
5732
|
current = true;
|
|
4052
5733
|
},
|
|
4053
5734
|
o: function (local) {
|
|
4054
|
-
transition_out(
|
|
5735
|
+
transition_out(profilemodal.$$.fragment, local);
|
|
4055
5736
|
current = false;
|
|
4056
5737
|
},
|
|
4057
5738
|
d: function (detaching) {
|
|
4058
|
-
destroy_component(
|
|
5739
|
+
destroy_component(profilemodal, detaching);
|
|
4059
5740
|
}
|
|
4060
5741
|
};
|
|
4061
5742
|
}
|
|
4062
|
-
// (
|
|
4063
|
-
function
|
|
4064
|
-
var
|
|
5743
|
+
// (84:51)
|
|
5744
|
+
function create_if_block_5(ctx) {
|
|
5745
|
+
var passwordsuccessmodal;
|
|
4065
5746
|
var updating_display;
|
|
4066
5747
|
var current;
|
|
4067
|
-
function
|
|
4068
|
-
/*
|
|
5748
|
+
function passwordsuccessmodal_display_binding(value) {
|
|
5749
|
+
/*passwordsuccessmodal_display_binding*/ ctx[14](value);
|
|
4069
5750
|
}
|
|
4070
|
-
var
|
|
5751
|
+
var passwordsuccessmodal_props = { closeModal: /*closeModal*/ ctx[5] };
|
|
4071
5752
|
if ( /*display*/ctx[0] !== void 0) {
|
|
4072
|
-
|
|
5753
|
+
passwordsuccessmodal_props.display = /*display*/ ctx[0];
|
|
4073
5754
|
}
|
|
4074
|
-
|
|
4075
|
-
binding_callbacks.push(function () { return bind(
|
|
5755
|
+
passwordsuccessmodal = new PassSuccessModal({ props: passwordsuccessmodal_props });
|
|
5756
|
+
binding_callbacks.push(function () { return bind(passwordsuccessmodal, 'display', passwordsuccessmodal_display_binding); });
|
|
4076
5757
|
return {
|
|
4077
5758
|
c: function () {
|
|
4078
|
-
create_component(
|
|
5759
|
+
create_component(passwordsuccessmodal.$$.fragment);
|
|
4079
5760
|
},
|
|
4080
5761
|
m: function (target, anchor) {
|
|
4081
|
-
mount_component(
|
|
5762
|
+
mount_component(passwordsuccessmodal, target, anchor);
|
|
4082
5763
|
current = true;
|
|
4083
5764
|
},
|
|
4084
5765
|
p: function (ctx, dirty) {
|
|
4085
|
-
var
|
|
5766
|
+
var passwordsuccessmodal_changes = {};
|
|
4086
5767
|
if (!updating_display && dirty & /*display*/ 1) {
|
|
4087
5768
|
updating_display = true;
|
|
4088
|
-
|
|
5769
|
+
passwordsuccessmodal_changes.display = /*display*/ ctx[0];
|
|
4089
5770
|
add_flush_callback(function () { return updating_display = false; });
|
|
4090
5771
|
}
|
|
4091
|
-
|
|
5772
|
+
passwordsuccessmodal.$set(passwordsuccessmodal_changes);
|
|
4092
5773
|
},
|
|
4093
5774
|
i: function (local) {
|
|
4094
5775
|
if (current)
|
|
4095
5776
|
return;
|
|
4096
|
-
transition_in(
|
|
5777
|
+
transition_in(passwordsuccessmodal.$$.fragment, local);
|
|
4097
5778
|
current = true;
|
|
4098
5779
|
},
|
|
4099
5780
|
o: function (local) {
|
|
4100
|
-
transition_out(
|
|
5781
|
+
transition_out(passwordsuccessmodal.$$.fragment, local);
|
|
4101
5782
|
current = false;
|
|
4102
5783
|
},
|
|
4103
5784
|
d: function (detaching) {
|
|
4104
|
-
destroy_component(
|
|
5785
|
+
destroy_component(passwordsuccessmodal, detaching);
|
|
4105
5786
|
}
|
|
4106
5787
|
};
|
|
4107
5788
|
}
|
|
4108
|
-
// (
|
|
4109
|
-
function
|
|
5789
|
+
// (82:43)
|
|
5790
|
+
function create_if_block_4(ctx) {
|
|
4110
5791
|
var passwordtokenmodal;
|
|
4111
5792
|
var updating_display;
|
|
4112
5793
|
var current;
|
|
4113
5794
|
function passwordtokenmodal_display_binding(value) {
|
|
4114
|
-
/*passwordtokenmodal_display_binding*/ ctx[
|
|
5795
|
+
/*passwordtokenmodal_display_binding*/ ctx[13](value);
|
|
4115
5796
|
}
|
|
4116
5797
|
var passwordtokenmodal_props = {
|
|
4117
|
-
closeModal: /*closeModal*/ ctx[
|
|
4118
|
-
onSuccessPasswordReset: /*onSuccess*/ ctx[
|
|
5798
|
+
closeModal: /*closeModal*/ ctx[5],
|
|
5799
|
+
onSuccessPasswordReset: /*onSuccess*/ ctx[2]
|
|
4119
5800
|
};
|
|
4120
5801
|
if ( /*display*/ctx[0] !== void 0) {
|
|
4121
5802
|
passwordtokenmodal_props.display = /*display*/ ctx[0];
|
|
@@ -4132,8 +5813,8 @@ function create_if_block_3(ctx) {
|
|
|
4132
5813
|
},
|
|
4133
5814
|
p: function (ctx, dirty) {
|
|
4134
5815
|
var passwordtokenmodal_changes = {};
|
|
4135
|
-
if (dirty & /*onSuccess*/
|
|
4136
|
-
passwordtokenmodal_changes.onSuccessPasswordReset = /*onSuccess*/ ctx[
|
|
5816
|
+
if (dirty & /*onSuccess*/ 4)
|
|
5817
|
+
passwordtokenmodal_changes.onSuccessPasswordReset = /*onSuccess*/ ctx[2];
|
|
4137
5818
|
if (!updating_display && dirty & /*display*/ 1) {
|
|
4138
5819
|
updating_display = true;
|
|
4139
5820
|
passwordtokenmodal_changes.display = /*display*/ ctx[0];
|
|
@@ -4156,15 +5837,15 @@ function create_if_block_3(ctx) {
|
|
|
4156
5837
|
}
|
|
4157
5838
|
};
|
|
4158
5839
|
}
|
|
4159
|
-
// (
|
|
4160
|
-
function
|
|
5840
|
+
// (80:44)
|
|
5841
|
+
function create_if_block_3(ctx) {
|
|
4161
5842
|
var passwordresetmodal;
|
|
4162
5843
|
var updating_display;
|
|
4163
5844
|
var current;
|
|
4164
5845
|
function passwordresetmodal_display_binding(value) {
|
|
4165
|
-
/*passwordresetmodal_display_binding*/ ctx[
|
|
5846
|
+
/*passwordresetmodal_display_binding*/ ctx[12](value);
|
|
4166
5847
|
}
|
|
4167
|
-
var passwordresetmodal_props = { closeModal: /*closeModal*/ ctx[
|
|
5848
|
+
var passwordresetmodal_props = { closeModal: /*closeModal*/ ctx[5] };
|
|
4168
5849
|
if ( /*display*/ctx[0] !== void 0) {
|
|
4169
5850
|
passwordresetmodal_props.display = /*display*/ ctx[0];
|
|
4170
5851
|
}
|
|
@@ -4202,21 +5883,21 @@ function create_if_block_2(ctx) {
|
|
|
4202
5883
|
}
|
|
4203
5884
|
};
|
|
4204
5885
|
}
|
|
4205
|
-
// (
|
|
4206
|
-
function
|
|
5886
|
+
// (78:35)
|
|
5887
|
+
function create_if_block_2(ctx) {
|
|
4207
5888
|
var signupmodal;
|
|
4208
5889
|
var updating_display;
|
|
4209
5890
|
var updating_params;
|
|
4210
5891
|
var current;
|
|
4211
5892
|
function signupmodal_display_binding(value) {
|
|
4212
|
-
/*signupmodal_display_binding*/ ctx[
|
|
5893
|
+
/*signupmodal_display_binding*/ ctx[10](value);
|
|
4213
5894
|
}
|
|
4214
5895
|
function signupmodal_params_binding(value) {
|
|
4215
|
-
/*signupmodal_params_binding*/ ctx[
|
|
5896
|
+
/*signupmodal_params_binding*/ ctx[11](value);
|
|
4216
5897
|
}
|
|
4217
5898
|
var signupmodal_props = {
|
|
4218
|
-
closeModal: /*closeModal*/ ctx[
|
|
4219
|
-
onSuccessSignup: /*onSuccess*/ ctx[
|
|
5899
|
+
closeModal: /*closeModal*/ ctx[5],
|
|
5900
|
+
onSuccessSignup: /*onSuccess*/ ctx[2]
|
|
4220
5901
|
};
|
|
4221
5902
|
if ( /*display*/ctx[0] !== void 0) {
|
|
4222
5903
|
signupmodal_props.display = /*display*/ ctx[0];
|
|
@@ -4237,8 +5918,8 @@ function create_if_block_1(ctx) {
|
|
|
4237
5918
|
},
|
|
4238
5919
|
p: function (ctx, dirty) {
|
|
4239
5920
|
var signupmodal_changes = {};
|
|
4240
|
-
if (dirty & /*onSuccess*/
|
|
4241
|
-
signupmodal_changes.onSuccessSignup = /*onSuccess*/ ctx[
|
|
5921
|
+
if (dirty & /*onSuccess*/ 4)
|
|
5922
|
+
signupmodal_changes.onSuccessSignup = /*onSuccess*/ ctx[2];
|
|
4242
5923
|
if (!updating_display && dirty & /*display*/ 1) {
|
|
4243
5924
|
updating_display = true;
|
|
4244
5925
|
signupmodal_changes.display = /*display*/ ctx[0];
|
|
@@ -4266,21 +5947,21 @@ function create_if_block_1(ctx) {
|
|
|
4266
5947
|
}
|
|
4267
5948
|
};
|
|
4268
5949
|
}
|
|
4269
|
-
// (
|
|
4270
|
-
function
|
|
5950
|
+
// (76:4) {#if display === "login"}
|
|
5951
|
+
function create_if_block_1(ctx) {
|
|
4271
5952
|
var loginmodal;
|
|
4272
5953
|
var updating_display;
|
|
4273
5954
|
var updating_params;
|
|
4274
5955
|
var current;
|
|
4275
5956
|
function loginmodal_display_binding(value) {
|
|
4276
|
-
/*loginmodal_display_binding*/ ctx[
|
|
5957
|
+
/*loginmodal_display_binding*/ ctx[8](value);
|
|
4277
5958
|
}
|
|
4278
5959
|
function loginmodal_params_binding(value) {
|
|
4279
|
-
/*loginmodal_params_binding*/ ctx[
|
|
5960
|
+
/*loginmodal_params_binding*/ ctx[9](value);
|
|
4280
5961
|
}
|
|
4281
5962
|
var loginmodal_props = {
|
|
4282
|
-
closeModal: /*closeModal*/ ctx[
|
|
4283
|
-
onSuccessLogin: /*onSuccess*/ ctx[
|
|
5963
|
+
closeModal: /*closeModal*/ ctx[5],
|
|
5964
|
+
onSuccessLogin: /*onSuccess*/ ctx[2]
|
|
4284
5965
|
};
|
|
4285
5966
|
if ( /*display*/ctx[0] !== void 0) {
|
|
4286
5967
|
loginmodal_props.display = /*display*/ ctx[0];
|
|
@@ -4301,8 +5982,8 @@ function create_if_block(ctx) {
|
|
|
4301
5982
|
},
|
|
4302
5983
|
p: function (ctx, dirty) {
|
|
4303
5984
|
var loginmodal_changes = {};
|
|
4304
|
-
if (dirty & /*onSuccess*/
|
|
4305
|
-
loginmodal_changes.onSuccessLogin = /*onSuccess*/ ctx[
|
|
5985
|
+
if (dirty & /*onSuccess*/ 4)
|
|
5986
|
+
loginmodal_changes.onSuccessLogin = /*onSuccess*/ ctx[2];
|
|
4306
5987
|
if (!updating_display && dirty & /*display*/ 1) {
|
|
4307
5988
|
updating_display = true;
|
|
4308
5989
|
loginmodal_changes.display = /*display*/ ctx[0];
|
|
@@ -4330,53 +6011,80 @@ function create_if_block(ctx) {
|
|
|
4330
6011
|
}
|
|
4331
6012
|
};
|
|
4332
6013
|
}
|
|
6014
|
+
// (73:2) {#if showLoader}
|
|
6015
|
+
function create_if_block(ctx) {
|
|
6016
|
+
var loader;
|
|
6017
|
+
var current;
|
|
6018
|
+
loader = new Loader({});
|
|
6019
|
+
return {
|
|
6020
|
+
c: function () {
|
|
6021
|
+
create_component(loader.$$.fragment);
|
|
6022
|
+
},
|
|
6023
|
+
m: function (target, anchor) {
|
|
6024
|
+
mount_component(loader, target, anchor);
|
|
6025
|
+
current = true;
|
|
6026
|
+
},
|
|
6027
|
+
p: noop,
|
|
6028
|
+
i: function (local) {
|
|
6029
|
+
if (current)
|
|
6030
|
+
return;
|
|
6031
|
+
transition_in(loader.$$.fragment, local);
|
|
6032
|
+
current = true;
|
|
6033
|
+
},
|
|
6034
|
+
o: function (local) {
|
|
6035
|
+
transition_out(loader.$$.fragment, local);
|
|
6036
|
+
current = false;
|
|
6037
|
+
},
|
|
6038
|
+
d: function (detaching) {
|
|
6039
|
+
destroy_component(loader, detaching);
|
|
6040
|
+
}
|
|
6041
|
+
};
|
|
6042
|
+
}
|
|
4333
6043
|
function create_fragment(ctx) {
|
|
4334
6044
|
var main;
|
|
4335
|
-
var t;
|
|
4336
6045
|
var current_block_type_index;
|
|
4337
|
-
var
|
|
6046
|
+
var if_block;
|
|
4338
6047
|
var current;
|
|
4339
|
-
var if_block0 = /*showLoader*/ ctx[2] && create_if_block_5();
|
|
4340
6048
|
var if_block_creators = [
|
|
4341
6049
|
create_if_block,
|
|
4342
6050
|
create_if_block_1,
|
|
4343
6051
|
create_if_block_2,
|
|
4344
6052
|
create_if_block_3,
|
|
4345
|
-
create_if_block_4
|
|
6053
|
+
create_if_block_4,
|
|
6054
|
+
create_if_block_5,
|
|
6055
|
+
create_if_block_6
|
|
4346
6056
|
];
|
|
4347
6057
|
var if_blocks = [];
|
|
4348
6058
|
function select_block_type(ctx, dirty) {
|
|
4349
|
-
if ( /*
|
|
6059
|
+
if ( /*showLoader*/ctx[4])
|
|
4350
6060
|
return 0;
|
|
4351
|
-
if ( /*display*/ctx[0] === "
|
|
6061
|
+
if ( /*display*/ctx[0] === "login")
|
|
4352
6062
|
return 1;
|
|
4353
|
-
if ( /*display*/ctx[0] === "
|
|
6063
|
+
if ( /*display*/ctx[0] === "signup")
|
|
4354
6064
|
return 2;
|
|
4355
|
-
if ( /*display*/ctx[0] === "
|
|
6065
|
+
if ( /*display*/ctx[0] === "forgot_password")
|
|
4356
6066
|
return 3;
|
|
4357
|
-
if ( /*display*/ctx[0] === "
|
|
6067
|
+
if ( /*display*/ctx[0] === "reset_password")
|
|
4358
6068
|
return 4;
|
|
6069
|
+
if ( /*display*/ctx[0] === "reset_password_success")
|
|
6070
|
+
return 5;
|
|
6071
|
+
if ( /*display*/ctx[0] === "profile")
|
|
6072
|
+
return 6;
|
|
4359
6073
|
return -1;
|
|
4360
6074
|
}
|
|
4361
6075
|
if (~(current_block_type_index = select_block_type(ctx))) {
|
|
4362
|
-
|
|
6076
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
4363
6077
|
}
|
|
4364
6078
|
return {
|
|
4365
6079
|
c: function () {
|
|
4366
6080
|
main = element("main");
|
|
4367
|
-
if (
|
|
4368
|
-
|
|
4369
|
-
t = space();
|
|
4370
|
-
if (if_block1)
|
|
4371
|
-
if_block1.c();
|
|
6081
|
+
if (if_block)
|
|
6082
|
+
if_block.c();
|
|
4372
6083
|
attr(main, "id", "msOverlay");
|
|
4373
|
-
attr(main, "class", "svelte-
|
|
6084
|
+
attr(main, "class", "svelte-1fq6c9b");
|
|
4374
6085
|
},
|
|
4375
6086
|
m: function (target, anchor) {
|
|
4376
6087
|
insert(target, main, anchor);
|
|
4377
|
-
if (if_block0)
|
|
4378
|
-
if_block0.m(main, null);
|
|
4379
|
-
append(main, t);
|
|
4380
6088
|
if (~current_block_type_index) {
|
|
4381
6089
|
if_blocks[current_block_type_index].m(main, null);
|
|
4382
6090
|
}
|
|
@@ -4384,26 +6092,6 @@ function create_fragment(ctx) {
|
|
|
4384
6092
|
},
|
|
4385
6093
|
p: function (ctx, _a) {
|
|
4386
6094
|
var _b = __read(_a, 1), dirty = _b[0];
|
|
4387
|
-
if ( /*showLoader*/ctx[2]) {
|
|
4388
|
-
if (if_block0) {
|
|
4389
|
-
if (dirty & /*showLoader*/ 4) {
|
|
4390
|
-
transition_in(if_block0, 1);
|
|
4391
|
-
}
|
|
4392
|
-
}
|
|
4393
|
-
else {
|
|
4394
|
-
if_block0 = create_if_block_5();
|
|
4395
|
-
if_block0.c();
|
|
4396
|
-
transition_in(if_block0, 1);
|
|
4397
|
-
if_block0.m(main, t);
|
|
4398
|
-
}
|
|
4399
|
-
}
|
|
4400
|
-
else if (if_block0) {
|
|
4401
|
-
group_outros();
|
|
4402
|
-
transition_out(if_block0, 1, 1, function () {
|
|
4403
|
-
if_block0 = null;
|
|
4404
|
-
});
|
|
4405
|
-
check_outros();
|
|
4406
|
-
}
|
|
4407
6095
|
var previous_block_index = current_block_type_index;
|
|
4408
6096
|
current_block_type_index = select_block_type(ctx);
|
|
4409
6097
|
if (current_block_type_index === previous_block_index) {
|
|
@@ -4412,7 +6100,7 @@ function create_fragment(ctx) {
|
|
|
4412
6100
|
}
|
|
4413
6101
|
}
|
|
4414
6102
|
else {
|
|
4415
|
-
if (
|
|
6103
|
+
if (if_block) {
|
|
4416
6104
|
group_outros();
|
|
4417
6105
|
transition_out(if_blocks[previous_block_index], 1, 1, function () {
|
|
4418
6106
|
if_blocks[previous_block_index] = null;
|
|
@@ -4420,39 +6108,35 @@ function create_fragment(ctx) {
|
|
|
4420
6108
|
check_outros();
|
|
4421
6109
|
}
|
|
4422
6110
|
if (~current_block_type_index) {
|
|
4423
|
-
|
|
4424
|
-
if (!
|
|
4425
|
-
|
|
4426
|
-
|
|
6111
|
+
if_block = if_blocks[current_block_type_index];
|
|
6112
|
+
if (!if_block) {
|
|
6113
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
6114
|
+
if_block.c();
|
|
4427
6115
|
}
|
|
4428
6116
|
else {
|
|
4429
|
-
|
|
6117
|
+
if_block.p(ctx, dirty);
|
|
4430
6118
|
}
|
|
4431
|
-
transition_in(
|
|
4432
|
-
|
|
6119
|
+
transition_in(if_block, 1);
|
|
6120
|
+
if_block.m(main, null);
|
|
4433
6121
|
}
|
|
4434
6122
|
else {
|
|
4435
|
-
|
|
6123
|
+
if_block = null;
|
|
4436
6124
|
}
|
|
4437
6125
|
}
|
|
4438
6126
|
},
|
|
4439
6127
|
i: function (local) {
|
|
4440
6128
|
if (current)
|
|
4441
6129
|
return;
|
|
4442
|
-
transition_in(
|
|
4443
|
-
transition_in(if_block1);
|
|
6130
|
+
transition_in(if_block);
|
|
4444
6131
|
current = true;
|
|
4445
6132
|
},
|
|
4446
6133
|
o: function (local) {
|
|
4447
|
-
transition_out(
|
|
4448
|
-
transition_out(if_block1);
|
|
6134
|
+
transition_out(if_block);
|
|
4449
6135
|
current = false;
|
|
4450
6136
|
},
|
|
4451
6137
|
d: function (detaching) {
|
|
4452
6138
|
if (detaching)
|
|
4453
6139
|
detach(main);
|
|
4454
|
-
if (if_block0)
|
|
4455
|
-
if_block0.d();
|
|
4456
6140
|
if (~current_block_type_index) {
|
|
4457
6141
|
if_blocks[current_block_type_index].d();
|
|
4458
6142
|
}
|
|
@@ -4460,14 +6144,80 @@ function create_fragment(ctx) {
|
|
|
4460
6144
|
};
|
|
4461
6145
|
}
|
|
4462
6146
|
function instance($$self, $$props, $$invalidate) {
|
|
4463
|
-
var
|
|
4464
|
-
var
|
|
6147
|
+
var _this = this;
|
|
6148
|
+
var showLoader;
|
|
6149
|
+
var _a = $$props.display, display = _a === void 0 ? "login" : _a; // or "signup", "forgot_password", "reset_password", "reset_password_success", and "profile"
|
|
4465
6150
|
var onSuccess = $$props.onSuccess;
|
|
4466
6151
|
var params = $$props.params;
|
|
6152
|
+
var appLoading = true;
|
|
6153
|
+
var memberLoading = display === "profile" ? true : false;
|
|
6154
|
+
var member;
|
|
6155
|
+
function setAppStore(data) {
|
|
6156
|
+
AppStore.update(function () { return data; });
|
|
6157
|
+
}
|
|
4467
6158
|
function closeModal() {
|
|
6159
|
+
// hacky way to remove all components prior to removing overlay
|
|
6160
|
+
$$invalidate(6, appLoading = true);
|
|
4468
6161
|
onSuccess({ type: "CLOSED" });
|
|
4469
6162
|
document.querySelector("#msOverlay").remove();
|
|
4470
6163
|
}
|
|
6164
|
+
var getApp = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
6165
|
+
var data;
|
|
6166
|
+
return __generator(this, function (_a) {
|
|
6167
|
+
switch (_a.label) {
|
|
6168
|
+
case 0: return [4 /*yield*/, window.$memberstackDom.getApp()];
|
|
6169
|
+
case 1:
|
|
6170
|
+
data = (_a.sent()).data;
|
|
6171
|
+
setAppStore(data);
|
|
6172
|
+
return [2 /*return*/];
|
|
6173
|
+
}
|
|
6174
|
+
});
|
|
6175
|
+
}); };
|
|
6176
|
+
function checkApp() {
|
|
6177
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6178
|
+
return __generator(this, function (_a) {
|
|
6179
|
+
switch (_a.label) {
|
|
6180
|
+
case 0:
|
|
6181
|
+
if (!(params && params.app)) return [3 /*break*/, 1];
|
|
6182
|
+
setAppStore(params.app);
|
|
6183
|
+
return [3 /*break*/, 3];
|
|
6184
|
+
case 1:
|
|
6185
|
+
console.log("No app specified - request it");
|
|
6186
|
+
return [4 /*yield*/, getApp()];
|
|
6187
|
+
case 2:
|
|
6188
|
+
_a.sent();
|
|
6189
|
+
_a.label = 3;
|
|
6190
|
+
case 3:
|
|
6191
|
+
$$invalidate(6, appLoading = false);
|
|
6192
|
+
$$invalidate(4, showLoader = false);
|
|
6193
|
+
return [2 /*return*/];
|
|
6194
|
+
}
|
|
6195
|
+
});
|
|
6196
|
+
});
|
|
6197
|
+
}
|
|
6198
|
+
var getMember = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
6199
|
+
var data;
|
|
6200
|
+
return __generator(this, function (_a) {
|
|
6201
|
+
switch (_a.label) {
|
|
6202
|
+
case 0: return [4 /*yield*/, window.$memberstackDom.getCurrentMember()];
|
|
6203
|
+
case 1:
|
|
6204
|
+
data = (_a.sent()).data;
|
|
6205
|
+
$$invalidate(7, memberLoading = false);
|
|
6206
|
+
$$invalidate(3, member = data);
|
|
6207
|
+
if (display === "profile" && !data) {
|
|
6208
|
+
closeModal();
|
|
6209
|
+
throw new Error("Member not logged in");
|
|
6210
|
+
}
|
|
6211
|
+
return [2 /*return*/];
|
|
6212
|
+
}
|
|
6213
|
+
});
|
|
6214
|
+
}); };
|
|
6215
|
+
onMount(function () {
|
|
6216
|
+
checkApp();
|
|
6217
|
+
if (display === "profile") {
|
|
6218
|
+
getMember();
|
|
6219
|
+
}
|
|
6220
|
+
});
|
|
4471
6221
|
function loginmodal_display_binding(value) {
|
|
4472
6222
|
display = value;
|
|
4473
6223
|
$$invalidate(0, display);
|
|
@@ -4492,32 +6242,43 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
4492
6242
|
display = value;
|
|
4493
6243
|
$$invalidate(0, display);
|
|
4494
6244
|
}
|
|
6245
|
+
function passwordsuccessmodal_display_binding(value) {
|
|
6246
|
+
display = value;
|
|
6247
|
+
$$invalidate(0, display);
|
|
6248
|
+
}
|
|
4495
6249
|
function profilemodal_display_binding(value) {
|
|
4496
6250
|
display = value;
|
|
4497
6251
|
$$invalidate(0, display);
|
|
4498
6252
|
}
|
|
4499
6253
|
$$self.$$set = function ($$props) {
|
|
4500
|
-
if ('showLoader' in $$props)
|
|
4501
|
-
$$invalidate(2, showLoader = $$props.showLoader);
|
|
4502
6254
|
if ('display' in $$props)
|
|
4503
6255
|
$$invalidate(0, display = $$props.display);
|
|
4504
6256
|
if ('onSuccess' in $$props)
|
|
4505
|
-
$$invalidate(
|
|
6257
|
+
$$invalidate(2, onSuccess = $$props.onSuccess);
|
|
4506
6258
|
if ('params' in $$props)
|
|
4507
6259
|
$$invalidate(1, params = $$props.params);
|
|
4508
6260
|
};
|
|
6261
|
+
$$self.$$.update = function () {
|
|
6262
|
+
if ($$self.$$.dirty & /*appLoading, memberLoading*/ 192) {
|
|
6263
|
+
$$invalidate(4, showLoader = appLoading || memberLoading);
|
|
6264
|
+
}
|
|
6265
|
+
};
|
|
4509
6266
|
return [
|
|
4510
6267
|
display,
|
|
4511
6268
|
params,
|
|
4512
|
-
showLoader,
|
|
4513
6269
|
onSuccess,
|
|
6270
|
+
member,
|
|
6271
|
+
showLoader,
|
|
4514
6272
|
closeModal,
|
|
6273
|
+
appLoading,
|
|
6274
|
+
memberLoading,
|
|
4515
6275
|
loginmodal_display_binding,
|
|
4516
6276
|
loginmodal_params_binding,
|
|
4517
6277
|
signupmodal_display_binding,
|
|
4518
6278
|
signupmodal_params_binding,
|
|
4519
6279
|
passwordresetmodal_display_binding,
|
|
4520
6280
|
passwordtokenmodal_display_binding,
|
|
6281
|
+
passwordsuccessmodal_display_binding,
|
|
4521
6282
|
profilemodal_display_binding
|
|
4522
6283
|
];
|
|
4523
6284
|
}
|
|
@@ -4525,12 +6286,7 @@ var Main = /** @class */ (function (_super) {
|
|
|
4525
6286
|
__extends(Main, _super);
|
|
4526
6287
|
function Main(options) {
|
|
4527
6288
|
var _this = _super.call(this) || this;
|
|
4528
|
-
init(_this, options, instance, create_fragment, safe_not_equal, {
|
|
4529
|
-
showLoader: 2,
|
|
4530
|
-
display: 0,
|
|
4531
|
-
onSuccess: 3,
|
|
4532
|
-
params: 1
|
|
4533
|
-
}, add_css);
|
|
6289
|
+
init(_this, options, instance, create_fragment, safe_not_equal, { display: 0, onSuccess: 2, params: 1 }, add_css);
|
|
4534
6290
|
return _this;
|
|
4535
6291
|
}
|
|
4536
6292
|
return Main;
|